Unsaved changes #1988
-
|
How to check if any changes on diagram? using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
You can see the // triggered when a new cell is added to the graph
graph.on('add', function(cell) {
console.log('New cell with id ' + cell.id + ' added to the graph.');
});
// generic event triggered for any change in the graph
graph.on('change', function(cell) {
console.log('Cell with id ' + cell.id + ' was changed.');
});Or you could be more specific and listen to a If using JointJS+, you can use the You can listen to when any change was made to the stacks i.e. when the graph actually changes. An example of this can be found in our Chatbot application. |
Beta Was this translation helpful? Give feedback.
You can see the
graphevents here:https://resources.jointjs.com/docs/jointjs/v3.6/joint.html#dia.Graph.events
Or you could be more specific and listen to a
changeon aLinkorElement:https://resources.jointjs.com/docs/jointjs/v3.6/joint.html#dia.Element.events
https://resources.jointjs.com/docs/jointjs/v3.6/joint.html#dia.Link.events
If using JointJS+, you can use the