You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the fix for #33 the crop state is kept as a % crop (onChange stores react-image-crop's percentCrop). Crop holds int values, so getCrop() rounds those percentages to whole units.
On a 4000px-wide image, 1% is 40px of granularity, and setCrop(getCrop()) visibly moves the selection. Previously onChange stored the pixel crop, so the granularity was roughly one rendered pixel.
Proposal: widen Crop's x, y, width and height from int to double. Note this changes the record's component types, so it is a breaking change for callers that read them — 1.3.0 would be the place for it.
Activity
fix!: keep sub-percent precision in crop values