`restrictPosition` wrong on `zoom`<1
Describe the bug
When restrictPosition is set to true and the zoom is negative the position restriction does not adhere to the documentation which claims "media should be restricted to the boundaries of the cropper". The short axis is stuck to 0 rather than moving freely on the available space.
Expected behavior The image should move freely within this boundaries
This is a good point, this is an edge case but it should not work like this.
To be honest, I don't have much bandwidth for this project at the moment so I can't commit on a date to work on this.
However, if someone wants to work on a fix, I can review and merge it.
Upon further investigation also croppedAreaPixels from onCropComplete is broken under restrictPosition with negative zoom. width and height will never exceed the image's natural size. This causes improper cropping of the image.
This is also broken when zoom=1 but rotation is applied again due to improper bounding of the crop area.
I will have to fix it somehow before going to production. I will try to create a PR by then 🚀