-
Notifications
You must be signed in to change notification settings - Fork 43
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
Zooming causes objects to move off screen #22
Comments
Is it possible to have component inside the pinch zoom view to initially be off-screen? So far I've noticed elements that are transformed to be outside the initially viewable area they are cut out of the view and overflow: 'visible" doesn't help. |
show code please |
Here's an example of the large PinchZoomView. My issue is that the PinchZoomView does not pay attention to where the zooming was initiated. It just shrinks or expands the transform of the view without also updating the X and Y position of the view. So if you try to zoom in on a component, that component doesn't necessarily stay on the screen.
|
try use width: device width instead of 1600 |
Hey @fultonm, |
I'm having an issue where, for large canvases, zooming changes the apparent pan location. In fact, offsetX stays 0 which the PinchZoomView has become smaller, and converges onto its center:
In this example the
PinchZoomView
has a width and height of 2500. The objects in the view are about 200x400.I'm working on a fix which would require the user to supply height/width of the
PinchZoomView
as props, then update the OffsetX using the width, OffsetX, and current scale in the equation, but this equation is difficult to think about.I think the component would be improved if the objects being zoomed in on stay in focus when zooming.
The text was updated successfully, but these errors were encountered: