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

How to vertically center nodes in a custom LayeredDigraphLayout

$
0
0

@itayh wrote:

Hi,

I'm using AlignedLayeredDigraphLayout (custom layout that i found on this forum) that works great with alligning all the nodes to the left.
however, i would like to also vertically center the nodes.
this is how it looks now:

and i would like it to look similar to:

these is the lyout settings:
myDiagram.groupTemplate = $(go.Group, "Vertical",
{
avoidable: false,
fromSpot: go.Spot.LeftRightSides,
toSpot: go.Spot.LeftRightSides,
layout: $(AlignedLayeredDigraphLayout, {
columnSpacing: 10,
layerSpacing: 100,
layeringOption: go.LayeredDigraphLayout.LayerOptimalLinkLength,
aggressiveOption: go.LayeredDigraphLayout.AggressiveMore,
initializeOption: go.LayeredDigraphLayout.InitDepthFirstIn,
packOption: go.LayeredDigraphLayout.PackAll,
setsPortSpots: false
})
// more stuff...
})

Can this be achieved?
Thanks.

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles