فهرست منبع

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