Closed MrMartiniMo closed 4 years ago
The init function dTree.init(jsonData, {}) returns a set of functions to manipulate the zoom handler.
dTree.init(jsonData, {})
resetZoom(duration = 500)
zoomTo(x, y, zoom = 1, duration = 500)
zoomToNode(nodeId, zoom = 2, duration = 500)
zoomToFit(duration = 500)
The duration parameter controls the transition animation speed.
duration
I need this feature, anyone gonna approve this please?
The init function
dTree.init(jsonData, {})
returns a set of functions to manipulate the zoom handler.resetZoom(duration = 500)
: reset zoom and position to initial statezoomTo(x, y, zoom = 1, duration = 500)
: zoom to a specific positionzoomToNode(nodeId, zoom = 2, duration = 500)
: zoom to a specific nodezoomToFit(duration = 500)
: zoom in/out to fit the entire diagram into the viewportThe
duration
parameter controls the transition animation speed.