Image Hosting & Cross Origin Errors
+Croppie uses canvas.drawImage(...) to manipulate images. Thus, images must obey the CORS policy. More info can be found here.
false
+ Enable or disable support for resizing the viewport area.
+ Default +false
+ Enable zooming functionality. If set to false - scrolling and pinching would not zoom.
@@ -140,8 +144,8 @@true
Enable or disable the ability to use the mouse wheel to zoom in and out on a croppie instance
+ mouseWheelZoombool/string +Enable or disable the ability to use the mouse wheel to zoom in and out on a croppie instance. If 'ctrl' is passed mouse wheel will only work while control keyboard is pressed
true
Bind an image the croppie. Returns a promise to be resolved when the image has been loaded and the croppie has been initialized.
+Bind an image to the croppie. Returns a promise to be resolved when the image has been loaded and the croppie has been initialized.
Parametersurl URL to imagepoints Array of points that translate into [topLeftX, topLeftY, bottomRightX, bottomRightY]zoom Apply zoom after image has been bound
+ zoom Apply zoom after image has been bound orientation Custom orientation, applied after exif orientation (if enabled). Only works with
enableOrientation option enabled (see 'Options').
6 rotated clockwise by 90 degrees7 flipped horizontally, then rotated right by 90 degrees8 rotated counter-clockwise by 90 degreesTriggered when a drag or zoom occurs
+
+$('.my-croppie').on('update.croppie', function(ev, cropData) {});
+// or
+document.getElementById('another-croppie').addEventListener('update', function(ev) { var cropData = ev.detail; });
+
Croppie uses canvas.drawImage(...) to manipulate images. Thus, images must obey the CORS policy. More info can be found here.
Croppie is dependent on it's container being visible when the bind method is called. This can be an issue when your croppie component is inside a modal that isn't shown. Let's take the bootstrap modal for example..
+
+var myCroppie = $('#my-croppie').croppie(opts);
+$('#my-modal').on('shown.bs.modal', function(){
+ myCroppie.croppie('bind', bindOpts);
+});
+
+ If you are having issues getting the correct crop result, and your croppie instance is shown inside of a modal, try taking your croppie out of the modal and see if your issues persist. If they don't, then make sure that your bind method is called after the modal is done animating.
+IE9 may be supported, but it isn't tested. If you're able to test it and let us know, please do so on Github.