Sfoglia il codice sorgente

Sync collab plugin: Disable undo (not implemented yet)

Joeri Exelmans 4 anni fa
parent
commit
683b2ca026

+ 9 - 0
src/main/webapp/plugins/cdf/versioning.browser.js

@@ -1919,6 +1919,15 @@ Draw.loadPlugin(async function(ui) {
   historyWrapper.newEmptyDiagram();
 
 
+  // HACK: disable undo
+  mxUndoManager.prototype.canUndo = function() {
+    return false;
+  };
+  mxUndoManager.prototype.canRedo = function() {
+    return false;
+  };
+
+
   // For debugging
   document.addEventListener('keydown', e => {
   //   console.log(e);

+ 9 - 0
src/main/webapp/plugins/cdf/versioning.js

@@ -637,6 +637,15 @@ Draw.loadPlugin(async function(ui) {
   historyWrapper.newEmptyDiagram();
 
 
+  // HACK: disable undo
+  mxUndoManager.prototype.canUndo = function() {
+    return false;
+  };
+  mxUndoManager.prototype.canRedo = function() {
+    return false;
+  };
+
+
   // For debugging
   document.addEventListener('keydown', e => {
   //   console.log(e);