@STM wrote:
Hi,
I have a very basic functionality to expand and collapse the tree of a particular node for which I have the following code.
node = diagramInstace.findNodeForKey(nodeId); if ( node.isTreeExpanded ) diagramInstace.commandHandler.collapseTree(node); else diagramInstace.commandHandler.expandTree(node); diagramInstace.commandhandler.scrollToPart(node.actualBounds);But the problems here is the
scrollToPartis not working as expected.I have tree layout applied by default on diagram.
Upon debugging it looked like my
scrollToPartstatement is executing before the tree is completely expanded or collapsed.I tried
TreeCollapsedandTreeExpandedevent on diagram but still no luck.
Following is my code in these eventvar it = arguments[0].subject.iterator; while (it.next()) { var item = it.value; node = this._diagramInstace.findNodeForKey(item.data.id); this._diagramInstace.commandHandler.scrollToPart(node.actualBounds); }So is there a event which states the expand/ collapse process is completed and I can
scrollToPartnow.
Posts: 1
Participants: 1