I have a GoJS canvas in which the user creates as per his wish, and the application needs to process the nodes in sequence.
So by GoJS documentation, there's gojsNodeObject.findTreeLevel(), which returns the level of the node in the diagram.
So far it worked just fine, but recently it caused an issue.
Please take a look at my diagram below on fiddle http://jsfiddle.net/2pqretgu/1/
according to the logic it is returning me the sequence as
["s1", "s2", "s3", "s4", "i1", "i2", "i3", "j1", "j2", "j3", "i4", "j4"]
but I would like the sequence to be
i1 should be before j1
j1 should be before i2 and i3
i2 and i3 should be before j2 and j3
j4 should be last
In short, I am executing the nodes as per the layers created by the layered layout, but I cannot depend on the layout to find its position, as a user can change the layout.
Any help or pointers would be appreciated