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

Mix of Normal and AvoidNodes routing

$
0
0

@cardis1 wrote:

Hi,

I have a problem with the routing of the links in my diagram...

In my link template. I set the routing to go.Link.Normal and some links overlap nodes. I suppose that is ok. But when I call the function "layoutDiagram(true)" on my diagram, it seems that the routing change to a mix of normal and avoidNodes and I don't know why.
Personally, I prefer the second state, but I want to know how to manage this behavior.

Before the call of layoutDiagram:



After the call of layoutDiagram:

Here my code:

    this._linkTemplates.add('',
        $(go.Link,
            {
                routing: go.Link.Normal,
                fromSpot: go.Spot.Bottom,
                toSpot: go.Spot.Top,
                cursor: 'pointer',
                corner: 5
            },
            $(go.Shape,
                {
                    isPanelMain: true,
                    strokeWidth: 4,
                    name: 'BORDER'
                },
                new go.Binding('stroke', '', this.getLinkColor.bind(this))
            ),
            $(go.Shape,
                {
                    toArrow: 'Standard',
                    strokeWidth: 6
                })
        )
    );

...
protected getLayout(): go.Layout {
let $ = go.GraphObject.make;
return $(go.LayeredDigraphLayout, { direction: 90, columnSpacing: 10, layerSpacing: 120, isOngoing: false });
}

Thank you

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles