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

[FEAT] Expose scrolling functions #127

Open
kyjus25 opened this issue May 2, 2023 · 0 comments
Open

[FEAT] Expose scrolling functions #127

kyjus25 opened this issue May 2, 2023 · 0 comments

Comments

@kyjus25
Copy link
Contributor

kyjus25 commented May 2, 2023

Issue

There currently exists no way to manipulate the transform of the tree after it has been rendered. When the SVG is given full page width/height, the tree is rendered to the top left of the screen.

For instance, to center the tree, marginLeft and marginTop can be used on initial creation, but unless you know ahead of time how big your tree is it is difficult to calculate the centerpoint. These functions also have no effect once the tree is already rendered, like when calling refresh() and providing a new settings. I would expect the new margin values to be respected.

Proposed Solution

Expose various functions to smoothly scroll to common key views:

  • Smoothly translate/zoom the tree so that the entire tree is in view and maximizes available screen/SVG dimensions
  • Smoothly translate to a specified Node at a configurable zoom
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

1 participant