fengyuanchen / cropperjs

JavaScript image cropper.
https://fengyuanchen.github.io/cropperjs/
MIT License
13.14k stars 2.42k forks source link

Coordinate system scaling #1148

Open mapsedge opened 8 months ago

mapsedge commented 8 months ago

In certain circumstances, the crop area is very small and difficult to set accurately. Right now we display the image at 2x scale, which requires additional calculations when storing the cropper coordinates. This introduces confusion and opportunities for error.

Describe the solution you'd like To be able to set a scale on the cropper coordinate system, so that if the working image is displayed at a different size, the coordinates are likewise scaled and still accurate when the image is displayed at normal size.