Skip to content Skip to sidebar Skip to footer

How To Update The Graph Model Efficiently After Certain Operation In Mxgraph?

After consecutive drag and drop in mxgraph, the parentInfo is lost for cell. Children and Parents for cell are not getting updated after consecutive drag and drop. Drag and Drop i

Solution 1:

As i could not find any references for clone and deep cloning has a bug in jGraph itself and its open issue as well, i managed to solve this having the reference copy of cell and re-constructing the cells under target.

mxConnectionHandler.prototype.connect = function(source, target) {
  const nodeData = [{"id":"12","value":"12-Double click to set name","children":[{"id":"14","value":"14-Double click to set name"}]}]
  drawNodes(graph, nodeData, target, source); // recursively
};

Post a Comment for "How To Update The Graph Model Efficiently After Certain Operation In Mxgraph?"