Alignment of nodes in Swimlane

Hi
I am working on swimlane, and when I link the nodes from swimlane to another is alient vertically, although when I have no link between swimlanes, its align horizontally like a charm.

I want it to be like this:

I wanted to be horizontally all the time. This beh

That is because each lane is implemented by a Group that has its own Group.layout. Each such Layout only considers Nodes and Links that are within the Group, hence it ignores Links that cross between Groups/lanes.

Sorry, but at this time we do not have a good layout that knows about restricting nodes to be within predetermined areas. It is on our list of layouts that we want to do.

Thanks for the fast reply. Is there any way that at least mitigate this behavior or workarounds?

When I get a chance I’ll work on it, but I can’t promise that it will be done soon. Actually, I can promise that it won’t be done soon – I need to release 1.7.16 now, and it’s late on a Friday.

Take a look at SwimLaneLayout extension: Beat Paths with Lanes for Divisions Using SwimLaneLayout
It is implemented at: https://gojs.net/latest/extensions/SwimLaneLayout.js
It is documented at: SwimLaneLayout | GoJS API

The SwimLaneLayout is a custom LayeredDigraphLayout | GoJS API that expects each node data object to have some property (defaults to “lane”) that names the lane the node/vertex should be placed in.

It arranges the Groups assuming there is one per lane, and that each Group’s key is the lane name. The way that the Group template is defined is important, but you have a lot of flexibility with its contents.

If you want to use it and customize it, you will need to be very familiar with GoJS. Please read Get Started with GoJS and all of the pages of the Introduction, starting at GoJS Introduction -- Northwoods Software, before undertaking non-trivial changes to this new sample or the SwimLanesLayout.