Open govi20 opened 7 years ago
Since a modal fade is set to display:none on page load, cropit does not get instantiated. To get around this, simply reload cropit by using something like this (adapted to your own needs, of course):
$('#uploadPics').on('shown.bs.modal', function (e) { $('.image-editor').cropit({ minZoom: 'fill', allowDragNDrop: true, initialZoom: 'min', smallImage: 'allow', onImageError: function(arg) { console.log(arg); alert(arg['message']); }, }); })
I have a file control, on selection of file I want to display image in bootstrap modal. But image is not getting rendered.
imageCrop.js
The same code is working if put the upload control with the class
cropit-image-input
in a bootstrap modal(Please check the above HTML snippet containing commented line). What is the hack to solve this issue?