I'm using this example: https://gojs.net/latest/samples/seatingChart.html We can seat a 'guest' by drag and drop events. However, I want to occupy a seat by code (create a node then seat a guest by code), with input is an object { id: "001", name: "Arya Stark", table : 3, seat: 1 }
How to do that?
Thanks you!
I haven't tried this, but maybe:
var newguest = { key:"Arya Stark", table:3, seat:1 };
myDiagram.model.commit(function(m) {
m.addNodeData(newguest);
positionPersonAtSeat(newguest);
}, "added guest");