summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ws/node.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ws/node.js b/src/ws/node.js
index d79137d..fa97368 100644
--- a/src/ws/node.js
+++ b/src/ws/node.js
@@ -106,6 +106,15 @@ Node.prototype.addChild = function(node, insertBeforeId)
this.children.push(node);
this.element.appendChild(node.element);
}
+
+ if(this.children.length == 0)
+ {
+ this.element.style.backgroundColor = "#aaa";
+ }
+ else
+ {
+ this.element.style.backgroundColor = "#aaaa81";
+ }
};
Node.prototype.removeChild = function(node)
@@ -116,6 +125,15 @@ Node.prototype.removeChild = function(node)
});
node.parent = null;
this.element.removeChild(node.element);
+
+ if(this.children.length == 0)
+ {
+ this.element.style.backgroundColor = "#aaa";
+ }
+ else
+ {
+ this.element.style.backgroundColor = "#aaaa81";
+ }
};
Node.prototype.create = function()