Hi everyone, I am trying to use binding to select dynamically which layout to apply to group nodes depending on node “colSize” property. However it does not seem to work and the layout is not displayed
If I set it statically (commented line), it is displayed correctly, any ideas ?
var threeColLayout = t(go.GridLayout,
{
wrappingColumn : 3,
cellSize : new go.Size(50, 10),
isRealtime: true }
);
myDiagram.groupTemplate =
t(go.Group, "Auto",
{
resizable: true,
resizeObjectName: "PANEL",
defaultAlignment: go.Spot.Center,
locationSpot: go.Spot.Center,
margin: 0,
stretch: go.GraphObject.Fill,
//layout: threeColLayout
},
new go.Binding("layout", "colSize", function(c) {
return threeColLayout;
}),