当用户在我的网站上加载draw.io时,我想知道他何时对其进行了更改。我的目标是禁用保存按钮,只要没有任何更改。我可以在mxEvent.CELLS_ADDED,mxEvent.CELLS_REMOVED,mxEvent.CELLS_RESIZED,mxEvent.CELLS_MOVED上设置一个属性。但是,是否只有一个事件可以捕捉到呢?
可能会捕捉到这样的事件:
Graph.prototype.addListener( mxEvent.CELLS_CHANGED,...
当用户dos改变时,我如何获得一个事件?
谢谢,弗兰克
发布于 2018-08-03 16:50:33
Graph.prototype.addListener(
'DrawIOLoaded',
mxUtils.bind(this, function() {
drawIoUi.editor.graph.getModel().addListener(
mxEvent.CHANGE,
mxUtils.bind(drawIoUi, function(sender, evt) {
// content was changed !!!
})
);
})
);https://stackoverflow.com/questions/51556973
复制相似问题