Wrap column in LayeredDigraphLayout

Need to wrap node in LayeredDigraphLayout inside Lane as its get wrap in grid layout after defining Wrapping Column

I need to override LayeredDigraphLayout so that I can able to use some of the property of LayeredDigraphLayout and GridLayout because I need to automatically adjust my nodes inside lane after some specific size using Spacing property

Right now I am using this code

function LayeredDigraphCustom() {
go.LayeredDigraphLayout.call(this);
this.isInitial = false; // don’t even do initial layout
this.isOngoing = false; // don’t invalidate layout when nodes or links are added or removed
this.direction = 0;
this.columnSpacing = 30;
this.layerSpacing = 30;
this.linkSpacing = 30;
this.setsPortSpots = false;
this.layeringOption = go.LayeredDigraphLayout.LayerLongestPathSource;
}

        go.Diagram.inherit(LayeredDigraphCustom, go.LayeredDigraphLayout);

        swimLanesGroupTemplate =
            $(go.Group, "Spot", groupStyle(),
                {
                    name: "Lane",
                    selectionAdorned: swimLaneshowSelection,  // use a Binding on the Shape.stroke to show selection
                    contextMenu: $(go.Adornment),//laneEventMenu,
                    minLocation: new go.Point(NaN, -Infinity),  // only allow vertical movement
                    maxLocation: new go.Point(NaN, Infinity),
                    selectionObjectName: "SHAPE",  // selecting a lane causes the body of the lane to be highlit, not the label
                    resizable: true, resizeObjectName: "SHAPE",  // the custom resizeAdornmentTemplate only permits two kinds of resizing
                    layout: $(LayeredDigraphCustom),
                    computesBoundsAfterDrag: true,  // needed to prevent recomputing Group.placeholder bounds too soon
                    computesBoundsIncludingLinks: false,  // to reduce occurrences of links going briefly outside the lane
                    computesBoundsIncludingLocation: true,  // to support empty space at top-left corner of lane
                    handlesDragDropForMembers: true,

but I need to update this swimLanesGroupTemplate Layout some event occurs

LayeredDigraphLayout does not support wrapping of nodes within a layer.

Do you have a small screenshot of what you have now and another showing what you want instead?

Right now my diagram is looking like this

I need to auto-arrange my diagram like this

in the middle of the lane with spacing from the right side from start

by overriding the properties of LayeredDigraphLayout

Try using SerpentineLayout, setting SerpentineLayout | GoJS API to the width that you want.

Hey Walter,
I have check SerpentineLayout but it doesn’t work for me can you provide me some example from where can I customize my LayeredDigraphLayout by inheriting some property from some other layouts.
because I have to look at my diagram as I already send you the image above.

The description of what you want is rather ambiguous, especially when applied to LayeredDigraphLayout, so I’m not sure I can provide an answer for you. If your graph is always a simple chain in multiple lanes, I do not see why you cannot use SerpentineLayout. But if your graph is not always a simple chain, please show an example using LayeredDigraphLayout that does not do what you want and what you want instead.