Browse Source

Prevented dragging modules when not in editMode

Nathan Schneider 4 years ago
parent
commit
d36e6de906
1 changed files with 3 additions and 1 deletions
  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