Преглед на файлове

Sync collab plugin: Disable undo (not implemented yet)

Joeri Exelmans преди 4 години
родител
ревизия
683b2ca026
променени са 2 файла, в които са добавени 18 реда и са изтрити 0 реда
  1. 9 0
      src/main/webapp/plugins/cdf/versioning.browser.js
  2. 9 0
      src/main/webapp/plugins/cdf/versioning.js

+ 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);