Adding Seats to the gojs nodes

371 views Asked by At

Here the link contains different tables and seats around it http://gojs.net/latest/samples/seatingChart.html I put two buttons one for adding seat and another for removing seat now i want add the seat when clicking addseat button and remove seat when clicking remove button Please Help me

1

There are 1 answers

0
ashokruthala On BEST ANSWER

Finally, I Implement code like this if we want to add a seat to the table use fallowing

myDiagram.findNodeForKey(keyId).add(Seat(1,"0.2 0","0.5 0"));

we will get keyId like this

 keyId= obj.part.data.key

If we want to remove the seat to table use fallowing

myDiagram.findNodeForKey(keyId).removeAt(seatno);

That's it!