Closed FraukeVdz closed 6 years ago
This is expected if you set prevent-white-space
to true
.
Code is at: https://github.com/zhanziyang/vue-croppa/blob/5e661062b34063967995ee5c201c8ee8ad20c600/src/cropper.vue#L1139-L1149
As you can see, if preventWhiteSpace
is true
, imageSet
will be false
, then in the this._placeImage()
function, the image position will be reset.
If you are curious why it should work this way, please see more in this issue.
Why not zoom in the image and avoid the reset even when prevent-white-space is set to true?
If you select an image smaller than the viewport it can be zoomed in to fill the viewport.
I think is a more desirable behaviour than reset coordinates.
Im trying to reproduce behaviour like the main demo in this page http://guillotine.js.org/ but it has been imposible so far.
Hey
When I change the width and height of the widget, the position of the image is reset to the middle. But when the widget is resized, I want the image to hold his original position (chosen by the user).
I can't seem to find the place in the code where this happens.
Can you help me?
Thanks!