Skip to content

[FEAT] Expose scrolling functions #127

@kyjus25

Description

@kyjus25

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions