Hi, I am using GoJs to show the tables map of a restaurant. I use a Mysql table to store the data of the position, colour, etc. I need to save the position when the user moves the table in the mouseup event.
I am using this format to show the nodes:
{ ‘key’: ‘1’, ‘pos’: ‘30 50’, ‘size’: ‘40 30’, ‘color’: ‘red’ }
The example that I used to read the positions is this
“ModelChanged”: function(e) { // just for demonstration purposes,
if (e.isTransactionFinished) { // show the model data in the page’s TextArea
document.getElementById(“mySavedModel”).textContent = e.model.toJson();
var mesas=document.getElementById(“mySavedModel”).textContent;
//var mesas=mesas1.nodeDataArray.key(1);
<?php [tables] = " document.write(tables) "; save_tables();?>
}
I appreciate if someone can help me. Bye. Guillermo