summaryrefslogtreecommitdiff
path: root/src/ws
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-07 14:22:24 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-07 14:22:24 +0200
commitfd0a192245c77c4ec51ca467b55df5365d23d6c2 (patch)
tree0465eb06d911e8c72c38d72a4a57aa90a1593858 /src/ws
parent133ad038681afc79adf47b7772508b3c187433cb (diff)
Prevent others for dragging a node while it is being dragged.
Diffstat (limited to 'src/ws')
-rw-r--r--src/ws/node.js6
1 files changed, 6 insertions, 0 deletions
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);
}
}
};