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

PanZoom with react-designer component #33

Open
tiagoravache opened this issue Dec 18, 2019 · 0 comments
Open

PanZoom with react-designer component #33

tiagoravache opened this issue Dec 18, 2019 · 0 comments

Comments

@tiagoravache
Copy link

Hi,

I'm developing a tool for a software where i needed to made a version of react-designer(https://github.com/react-designer/react-designer) combined with panZoom, in the 'draw container' i put a background image to guide the user where they have to draw some shapes to highlight some areas of bakground, and it's works very well but, when zooming the draw container, the reference of points 'x' and 'y' of mouseClick got offset, resulting in a shape drawed in another position relation to background, i suppose that is necessary consider zoom in the transform matrix but i'm not sure how to, so could you explain to me the calculations you made on the transform matrix? After this i can work on implementation of this calculus that consider the relative position of the mouse pointer in the zoomed image. Or if exist some way to do that with some feature that PanZoom already have.
If you need more information about this case, i'm glad to provide to you everithing you need to solve this situation.
Thanks

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