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

Trying to crop visible area of panzoom - how to handle zoom/scale for x/y coords #638

Open
rich06 opened this issue Feb 9, 2023 · 0 comments

Comments

@rich06
Copy link

rich06 commented Feb 9, 2023

Hello

Cool library - thanks for all the hard work!

I am trying to crop the visible area of a panzoom controlled image. I'm doing this by converting the image to a canvas using the panzoom pan coordinates as offsets for the crop. This works fine when no scaling/zooming occurs but when that happens the coordinates no longer match the 'visible' area.

What's the best way to achieve this? Any suggestions welcome!

Thanks in advance
Rich

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

1 participant