Improved test graphs

This commit is contained in:
Gonzalo Bellver
2012-01-04 14:37:58 -03:00
parent 344573d4bd
commit ad1bb136fd
4 changed files with 70 additions and 13 deletions

View File

@@ -137,6 +137,9 @@ mindplot.nlayout.RootedTreeSet = new Class({
var fillColor = this._rootNodes.contains(node) ? "#000" : "#c00";
rect.attr('fill', fillColor);
rect.click(function() {console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position: {" + node.getPosition().x + "," + node.getPosition().y + "}, size: {" + node.getSize().width + "," + node.getSize().height + "}");});
text.click(function() {console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position: {" + node.getPosition().x + "," + node.getPosition().y + "}, size: {" + node.getSize().width + "," + node.getSize().height + "}");});
for (var i=0; i<children.length; i++) {
var child = children[i];
this._plot(canvas, child);