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

Prevented dragging modules when not in editMode

Nathan Schneider преди 4 години
родител
ревизия
d36e6de906
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      _layouts/rule.html

+ 3 - 1
_layouts/rule.html

@@ -25,7 +25,9 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
       var target = ev.target;
       // First, confirm target location is valid
       function targetCheck () {
-          if (target.id == "module-input") { 
+          if (!editMode) {
+              return false;
+          } else if (target.id == "module-input") { 
               return true;
           } else if (!document.getElementById("module-input").contains(target)) {
               // Ignore destinations not in the correct area