Hi Walter. I use next nodeDataModel
{
key: number,
text: string,
diagramSettings: {
loc: string,
}
}
and binding location by next method
new go.Binding('location', 'diagramSettings', (object) => go.Point.parse(object.loc)).makeTwoWay((value, object) => {
const newSettings = object.diagramSettings;
newSettings.loc = go.Point.stringify(value);
object.diagramSettings = newSettings;
return newSettings;
}),
There are cases when loc is empty string, and when I add two or more objects on diagram they set in the same locations (upon one another).
How to resolve it? I think that my problem in layout. How to set up it?
I use default layout.