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

limit to zoom to horizontal (x) or vertical (y) #124

Closed
timelyportfolio opened this issue Jun 17, 2015 · 2 comments
Closed

limit to zoom to horizontal (x) or vertical (y) #124

timelyportfolio opened this issue Jun 17, 2015 · 2 comments

Comments

@timelyportfolio
Copy link
Collaborator

Based on #37, I see how to easily limit the panning to one axis. However, zooming does not offer this functionality. Would it be possible to limit the zoom easily to one axis? Although this is not the expected application, but maybe something like a timeline where we would like to zoom to a particular subperiod.

Related to timelyportfolio/svgPanZoom#8

@bumbu
Copy link
Owner

bumbu commented Jun 23, 2015

I believe that it is possible to be done now. There are 2 different features that should allow that:

  • you can return false from beforeZoom and that zooming will get canceled
  • you can dynamically update min/maxZoom via setMaxZoom and setMinZoom

Can you please explain in more detail how limiting zooming on one axis should work? It is just hard for me to understand how you can limit zoom on one axis because zooming is done for both axis in parallel.

@bumbu bumbu added the question label Jun 23, 2015
@bumbu
Copy link
Owner

bumbu commented Jun 30, 2015

I'm closing this issue until more details are provided.

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

No branches or pull requests

2 participants