iam trying to use concept map in gojs…every time iam loading the page…iam getting different structures for same data… Can you suggest how to fix the map structure
The Concept Map sample uses a Force Directed layout, which will not produce the same results every time. If you want the same result each time, you’ll need to use a different method of positioning nodes.
thanks jhardy…please be clear on different methods of positioning nodes…
The best way to achieve what you’re looking for would be to set a two-way data binding on location in your node template(s), perform the layout once, and then save that model with location data for future use.
Then, in your layout, you can set isInitial and isOngoing to false. Then, any time you want to relayout the diagram, you’ll need to manually call Diagram.layoutDiagram.
Some of these concepts can be seen in the Page Flow sample, but it doesn’t have initial locations saved in the model.