How do I properly use graph.zoom? #5184
Unanswered
Brendan-DH
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use graph.zoom to focus on certain nodes when clicked. However, the spatial argument of zoom() seems to work quite strangely.
For example, if I do
graph.zoom(1, {x:100,y:100})then the view will not change whatsoever, compared tograph.zoom(1, { x: 0, y: 0 }). However, if I dograph.zoom(0.5, {x:100, y:100}), then the graph will zoom out to 0.5 and shift down and to the right compared tograph.zoom(0.5, { x: 0, y: 0 })(as expected). Am I missing something? Why can't I move the viewport position withgraph.zoom(1, {x:100,y:100})? And why does the scale of the spatial transformation seem to decrease if I dograph.zoom(2, {x:100,y:100})?Beta Was this translation helpful? Give feedback.
All reactions