Skip to content

Improve / combine makeVisible() and scrollIntoView() #139

@mar10

Description

@mar10
  • Currently node.makeVisible() only expands the parents, but doesn't care if the node is visible in the viewport
  • scrollIntoView() currently only scrolls nodes that are scrolled outside the tree $container, i.e. if the $container has a scrollbar.
    It does not work if the container is larger than the screen, i.e. if the body has the scrollbar.
  • scrollIntoView() should also be tested with lazyloading and animation. There might be problems to calculate the offsets if the node's elements are invisible.

makeVisible() could accept options and combine both methods:

{
    expandParents: true,
    noAnimation: false,
    scrollIntoView: true,
    topNode: null
}

Also a $.promise should be returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions