1

I'm activating a tree node from an external panel. since the tree is pretty large i want to autoscroll to the activated node and do some further data reading ... my question is how to perform such an automatic scroll? i've searched around a lot but still haven't found something helpful - except some dyna-tree sources.

thanks andy

2 Answers2

2

i found a solution or better workaround! when i activate the corresponding dataentry in a table via dblclick and close the treeelement before showing the table in a sidepanel, the selected node is opened automatically and scrolled also by using this code

             var node = $("#tree").fancytree("getActiveNode");
             node.makeVisible({scrollIntoView: true}); // nodeSetFocus will scroll
  • 1
    Sometimes the node is not visible afterwards, because the delay for the 'expand' animation is longer than the delay for the scroll animation, so by the time the scrolling finished and the tree thinks the node is in-view, the expanding animations continue and end up pushing it out of view. Huge bug or lack of consideration for coordinating these interdependent operations. The scrolling is also buggy, because it only barely brings the node into view in some cases, leaving it so near the bottom or top edge of the container that it's often clipped a bit. – Triynko Feb 24 '17 at 20:54
0

This feature is in to-do-list according to the following link: http://wwwendt.de/tech/fancytree/demo/sample-configurator.html .

  • Welcome to Stack Overflow. Please include all the necessary details in your answer rather than linking to a resource outside the site. – tsnorri Mar 06 '15 at 01:49