Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotated ROI should be more stable when resized #132

Open
targos opened this issue Mar 7, 2024 · 1 comment
Open

Rotated ROI should be more stable when resized #132

targos opened this issue Mar 7, 2024 · 1 comment

Comments

@targos
Copy link
Member

targos commented Mar 7, 2024

https://react-roi.pages.dev/?path=/story/full-examples--crop-image

When I move the left part, the right part should be fixed.

CleanShot 2024-03-07 at 11 58 34

@stropitek
Copy link
Contributor

I've had this kind of behaviour before, and I can't explain it. It was worse before when I was rendering the ROIs inside the zoom transform (when zoomed in a lot, the jittering was much more).

Given that it goes back and fourth, I can only assume it is some sort of precision problem? I've tried to log the computed position of the fixed corner and it only varies back and forth of an order of 10^-13...

With a few tests, I've seen that if the css center of rotation is the fixed corner, then the jiggling disappears, so I'm going with this approach, expressing the coordinates with a different center of rotation depending on the action performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants