From fd0a192245c77c4ec51ca467b55df5365d23d6c2 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 7 Jun 2020 14:22:24 +0200 Subject: Prevent others for dragging a node while it is being dragged. --- src/ws/node.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ws/node.js b/src/ws/node.js index 6ff8e50..e2af81e 100644 --- a/src/ws/node.js +++ b/src/ws/node.js @@ -159,11 +159,17 @@ Node.prototype.setAttribute = function(name, value) { if(value == "true") { + // Make transparent and non-draggable this.element.style.opacity = "0.3"; + // TODO: Apply recursively? + this.element.setAttribute("draggable", false); } else { + // Make opaque and draggable again this.element.style.opacity = "1.0"; + // TODO: Apply recursively? + this.element.setAttribute("draggable", true); } } }; -- cgit v1.2.3