When use node.CollapseTree or node.expandTree methods, the animation of expansion and collapse is missing. Though the functionality works as expected how can i get the animation back when manually expanding or collpasing nodes
$(
'TreeExpanderButton',
{ ...treeExpanderObject, click: this.diagram.onClickOfTreeExpander },
{ position: new go.Point(224, 28) }
)
onClickOfTreeExpander = (e: any, obj: go.GraphObject) => {
const node = this.dia.findNodeForKey(obj.part?.data.key);
if (!node?.isTreeExpanded) {
this.collapseAllPolicies();
node?.expandTree();
} else {
node.collapseTree();
}
Also how can i get the go.Node object if i have the go.Part. Right now i have to find the node again from diagram by the key.
const node = this.dia.findNodeForKey(obj.part?.data.key);