I need to achieve custom position of nodes and im turning off the property isLayoutPositioned. my issue is that when i create a new graph my backend returns all predefined nodes with loc: null so in the first load of the graph if the isLayoutPosisition is false my graph is not appearing. is there any way to achieve isLayoutPositions: false with loc values to be null?
here is my nodeTemplate:
$(go.Node,
'Vertical',
{
deletable: this.allowEdit,
isLayoutPositioned: false,
toSpot: go.Spot.Left,
cursor: 'pointer',
selectionObjectName: 'SHAPE',
},
new go.Binding('location', 'loc').makeTwoWay(),
$(
go.Panel,
'Auto', {
name: 'SHAPE',
portId: '',
alignment: go.Spot.Center,
alignmentFocus: go.Spot.Bottom,
fromLinkable: true,
fromLinkableSelfNode: this.allowEdit,
fromLinkableDuplicates: this.allowEdit,
toLinkable: true,
toLinkableSelfNode: false,
toLinkableDuplicates: false,
toSpot: go.Spot.AllSides,
fromSpot: go.Spot.AllSides
},
$(go.Picture,
{
desiredSize: new go.Size(50, 50),
margin: new go.Margin(6, 8, 6, 10)
},
new go.Binding('source', 'assetType', (key) => {
return 'assets/designer-images/' + key + '.png';
})
),
),
$(go.Panel, 'Auto', {},
$(
go.TextBlock,
{
name: 'SHAPE',
editable: this.allowEdit,
font: 'bold 13px sans-serif',
opacity: 0.75,
stroke: '#404040',
},
new go.Binding('text', 'label').makeTwoWay()
)
)
);
}