Prechádzať zdrojové kódy

Prevented dragging modules when not in editMode

Nathan Schneider 4 rokov pred
rodič
commit
d36e6de906
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  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