From ad1bb136fd6de5641b3d232bb50824f0f3e234cf Mon Sep 17 00:00:00 2001 From: Gonzalo Bellver Date: Wed, 4 Jan 2012 14:37:58 -0300 Subject: [PATCH] Improved test graphs --- .../main/javascript/nlayout/RootedTreeSet.js | 3 + .../src/main/javascript/nlayout/TestSuite.js | 75 ++++++++++++++++--- .../javascript/nlayout/raphael-plugins.js | 1 - .../src/test/javascript/static/layout.html | 4 + 4 files changed, 70 insertions(+), 13 deletions(-) diff --git a/mindplot/src/main/javascript/nlayout/RootedTreeSet.js b/mindplot/src/main/javascript/nlayout/RootedTreeSet.js index 5cba7d56..22399183 100644 --- a/mindplot/src/main/javascript/nlayout/RootedTreeSet.js +++ b/mindplot/src/main/javascript/nlayout/RootedTreeSet.js @@ -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
+

testReconnect:

+
+
+

testRemoveNode: