Im using a following comparer function:
sorting: go.TreeLayout.SortingDescending,
comparer: function(va: go.TreeVertex, vb: go.TreeVertex) {
if(va.node === null || vb.node === null)
return 0;
var da = va.node.data;
var db = vb.node.data;
if (da.order < db.order) return 1;
if (da.order > db.order) return -1;
return 0;
},
Children of a given node are assigned a certain order on creation (number of children + 1) and there is an option of reordering nodes.
Reordering works but when adding a new child node, the reordered node somehow animates from the previous order to the current one. It’s only during the animation. Why is it happening? It seems like the animation takes the initial position from the default comparer.