Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

How to Sort the rendering of nodes in consistent way?

$
0
0

@fooBarSoft wrote:

Hello,
I am newbie and using GoJs. I have nodes, groups and links. When I load the page, I sometimes get Render 1 and other times I get Render 2. I was playing around with sorting properties but it is not working as expected.

This is what I looked at:
https://gojs.net/latest/api/symbols/TreeLayout.html#comparer
https://gojs.net/latest/api/symbols/LayeredDigraphLayout.html

  1. Do you know how is this order determined?
  2. How can I control such that it is consistent render of the nodes in my UI ?

Here is my snippet:

diagram.groupTemplate.layout = $(go.GridLayout,
{
wrappingColumn: 1,
sorting: go.GridLayout.Ascending
}

var diagram =
$(go.Diagram, "diagram-div", {
autoScale: go.Diagram.Uniform,
contentAlignment: go.Spot.TopLeft,
"toolManager.hoverDelay": 10,
layout: $(go.LayeredDigraphLayout,
{
aggressiveOption: go.LayeredDigraphLayout.AggressiveMore,
setsPortSpots: false,
isOngoing: false
})
});

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles