Selaa lähdekoodia

Prevented dragging modules when not in editMode

Nathan Schneider 4 vuotta sitten
vanhempi
commit
d36e6de906
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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