Replies: 1 comment
-
|
Try this: window.addEventListener('DOMContentLoaded', function () {
var image = document.querySelector('#image');
var cropper = new Cropper(image, {
viewMode: 3,
dragMode: 'move',
aspectRatio: image.naturalWidth / image.naturalHeight,
autoCropArea: 1,
restore: false,
cropBoxMovable: false,
cropBoxResizable: false,
toggleDragModeOnDblclick: false,
});
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a long height image
Is there a way to constrain the movement of the cropbox to fit the width or height of the image?
Beta Was this translation helpful? Give feedback.
All reactions