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

Change/extend zoom (direction/public api) #35

Open
gossi opened this issue Jul 9, 2010 · 4 comments
Open

Change/extend zoom (direction/public api) #35

gossi opened this issue Jul 9, 2010 · 4 comments

Comments

@gossi
Copy link

gossi commented Jul 9, 2010

I was kinda confused, when I mousewheeled down and my graph gets smaller. Somehow I expected a zoom-in. So I switched over to google maps and yep, that's where my habituation comes from. I don't know of other services right now, that have zoom implemented to check, but I'd think gmaps is the most and well known zoom service and most people are habituated with that direction of zoom, so it's a good reason to change it.

Anyway, is there some kind of public API, where I can set the zoom from outside? Like graph.zoom(value) ? Is there a chance to get the zoom value like graph.getZoom() or just via the MouseWheel event? What about boundaries, min and max zoom. With that one could build a slider around the graph.

@philogb
Copy link
Owner

philogb commented Jul 9, 2010

What browser are you using?
Mousewheel down zooms-out in my computer both the viz and the maps.

@gossi
Copy link
Author

gossi commented Jul 10, 2010

Yeps, but I expected the opposite. See this metapher:

Mousewheel down = Pull content to me = zoom-in
Mousewheel up = Push content away from me = zoom-out

@philogb
Copy link
Owner

philogb commented Jul 10, 2010

Oh, that isn't documented, but it can be done by setting the zooming value to a negative value, for example zooming: -10. I'll think about how to design the zooming options to also accept methods. Thanks for your feedback.

@gossi
Copy link
Author

gossi commented Jul 11, 2010

Ah nice. That works pretty well - thanks.

So I encountered some behaviors while testing zoom:

  • Chrome and Safari (Webkit?) are far more sensible with the scrolling value than Opera and FF are (I have no IE).
  • Zooming gets reverse. When zooming in and in and in, the zoom turns at a point 'zero' and zooms out with the nodes mirrored in the graphs origin.

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