From c7ddfd6135db3e949c925d0eb402fc87f1878f95 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sat, 14 Jan 2012 14:20:59 -0300 Subject: [PATCH] nlayout refactor. --- mindplot/pom.xml | 24 +- mindplot/src/main/javascript/Designer.js | 2 +- mindplot/src/main/javascript/header.js | 2 +- .../javascript/layout/AbstractBasicSorter.js | 10 +- .../main/javascript/layout/BalancedSorter.js | 18 +- .../src/main/javascript/layout/ChangeEvent.js | 2 +- .../layout/ChildrenSorterStrategy.js | 2 +- .../javascript/layout/EventBusDispatcher.js | 8 +- .../src/main/javascript/layout/GridSorter.js | 10 +- .../main/javascript/layout/LayoutManager.js | 8 +- mindplot/src/main/javascript/layout/Node.js | 2 +- .../main/javascript/layout/OriginalLayout.js | 12 +- .../main/javascript/layout/RootedTreeSet.js | 2 +- .../main/javascript/layout/SymmetricSorter.js | 16 +- .../src/test/javascript/static/TestSuite.js | 250 +++++++++--------- .../src/test/javascript/static/layout.html | 22 +- 16 files changed, 195 insertions(+), 195 deletions(-) diff --git a/mindplot/pom.xml b/mindplot/pom.xml index 154dbf1f..011fa1a5 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -176,27 +176,27 @@ files="widget/Menu.js"/> - + files="layout/EventBusDispatcher.js"/> + + files="layout/LayoutManager.js"/> + files="layout/Node.js"/> + files="layout/RootedTreeSet.js"/> + files="layout/ChildrenSorterStrategy.js"/> + files="layout/AbstractBasicSorter.js"/> + files="layout/BalancedSorter.js"/> + files="layout/SymmetricSorter.js"/> + files="layout/GridSorter.js"/> - + files="layout/OriginalLayout.js"/> + diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index cb162051..5a110158 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -56,7 +56,7 @@ mindplot.Designer = new Class({ this._relPivot = new mindplot.RelationshipPivot(this._workspace, this); // Init layout manager ... - this._eventBussDispatcher = new mindplot.nlayout.EventBusDispatcher(this.getModel()); + this._eventBussDispatcher = new mindplot.layout.EventBusDispatcher(this.getModel()); }, _registerEvents : function() { diff --git a/mindplot/src/main/javascript/header.js b/mindplot/src/main/javascript/header.js index 03e446a9..3c5c2f6b 100644 --- a/mindplot/src/main/javascript/header.js +++ b/mindplot/src/main/javascript/header.js @@ -29,4 +29,4 @@ mindplot.collaboration.framework = {}; mindplot.collaboration.framework.brix = {}; mindplot.collaboration.framework.brix.model = {}; -mindplot.nlayout = {}; +mindplot.layout = {}; diff --git a/mindplot/src/main/javascript/layout/AbstractBasicSorter.js b/mindplot/src/main/javascript/layout/AbstractBasicSorter.js index daf6d60f..ef72c718 100644 --- a/mindplot/src/main/javascript/layout/AbstractBasicSorter.js +++ b/mindplot/src/main/javascript/layout/AbstractBasicSorter.js @@ -15,8 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.AbstractBasicSorter = new Class({ - Extends: mindplot.nlayout.ChildrenSorterStrategy, +mindplot.layout.AbstractBasicSorter = new Class({ + Extends: mindplot.layout.ChildrenSorterStrategy, computeChildrenIdByHeights: function(treeSet, node) { var result = {}; @@ -25,7 +25,7 @@ mindplot.nlayout.AbstractBasicSorter = new Class({ }, _computeChildrenHeight : function(treeSet, node, heightCache) { - var height = node.getSize().height + (mindplot.nlayout.AbstractBasicSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding; + var height = node.getSize().height + (mindplot.layout.AbstractBasicSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding; var result; var children = treeSet.getChildren(node); @@ -56,5 +56,5 @@ mindplot.nlayout.AbstractBasicSorter = new Class({ } }); -mindplot.nlayout.AbstractBasicSorter.INTERNODE_VERTICAL_PADDING = 5; -mindplot.nlayout.AbstractBasicSorter.INTERNODE_HORIZONTAL_PADDING = 30; \ No newline at end of file +mindplot.layout.AbstractBasicSorter.INTERNODE_VERTICAL_PADDING = 5; +mindplot.layout.AbstractBasicSorter.INTERNODE_HORIZONTAL_PADDING = 30; \ No newline at end of file diff --git a/mindplot/src/main/javascript/layout/BalancedSorter.js b/mindplot/src/main/javascript/layout/BalancedSorter.js index 8380185d..e59b6d3f 100644 --- a/mindplot/src/main/javascript/layout/BalancedSorter.js +++ b/mindplot/src/main/javascript/layout/BalancedSorter.js @@ -15,8 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.BalancedSorter = new Class({ - Extends: mindplot.nlayout.AbstractBasicSorter, +mindplot.layout.BalancedSorter = new Class({ + Extends: mindplot.layout.AbstractBasicSorter, initialize: function() { @@ -29,7 +29,7 @@ mindplot.nlayout.BalancedSorter = new Class({ }, _computeChildrenHeight : function(treeSet, node, heightCache) { - var height = node.getSize().height + (mindplot.nlayout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding; + var height = node.getSize().height + (mindplot.layout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding; var result; var children = treeSet.getChildren(node); @@ -63,7 +63,7 @@ mindplot.nlayout.BalancedSorter = new Class({ // No children? if (children.length == 0) { - return [0, {x:parent.getPosition().x + parent.getSize().width + mindplot.nlayout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING * 2, y:parent.getPosition().y}]; + return [0, {x:parent.getPosition().x + parent.getSize().width + mindplot.layout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING * 2, y:parent.getPosition().y}]; } @@ -75,7 +75,7 @@ mindplot.nlayout.BalancedSorter = new Class({ var cpos = child.getPosition(); if (position.y > cpos.y) { yOffset = child == last ? - child.getSize().height + mindplot.nlayout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 : + child.getSize().height + mindplot.layout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 : (children[index + 1].getPosition().y - child.getPosition().y)/2; result = [child.getOrder() + 2,{x:cpos.x, y:cpos.y + yOffset}]; } @@ -86,7 +86,7 @@ mindplot.nlayout.BalancedSorter = new Class({ var first = children[0]; result = [position.x > 0 ? 0 : 1, { x:first.getPosition().x, - y:first.getPosition().y - first.getSize().height - mindplot.nlayout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 + y:first.getPosition().y - first.getSize().height - mindplot.layout.BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 }]; } @@ -167,7 +167,7 @@ mindplot.nlayout.BalancedSorter = new Class({ } var yOffset = ysum + heights[i].height / 2; - var xOffset = direction * (node.getSize().width/2 + heights[i].width/2 + + mindplot.nlayout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING); + var xOffset = direction * (node.getSize().width/2 + heights[i].width/2 + + mindplot.layout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING); $assert(!isNaN(xOffset), "xOffset can not be null"); $assert(!isNaN(yOffset), "yOffset can not be null"); @@ -208,5 +208,5 @@ mindplot.nlayout.BalancedSorter = new Class({ } }); -mindplot.nlayout.BalancedSorter.INTERNODE_VERTICAL_PADDING = 5; -mindplot.nlayout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING = 30; +mindplot.layout.BalancedSorter.INTERNODE_VERTICAL_PADDING = 5; +mindplot.layout.BalancedSorter.INTERNODE_HORIZONTAL_PADDING = 30; diff --git a/mindplot/src/main/javascript/layout/ChangeEvent.js b/mindplot/src/main/javascript/layout/ChangeEvent.js index c67842f6..057c1fa1 100644 --- a/mindplot/src/main/javascript/layout/ChangeEvent.js +++ b/mindplot/src/main/javascript/layout/ChangeEvent.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.ChangeEvent = new Class({ +mindplot.layout.ChangeEvent = new Class({ initialize:function(id) { $assert(!isNaN(id), "id can not be null"); this._id = id; diff --git a/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js b/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js index 7d922d04..2b3bc428 100644 --- a/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js +++ b/mindplot/src/main/javascript/layout/ChildrenSorterStrategy.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.ChildrenSorterStrategy = new Class({ +mindplot.layout.ChildrenSorterStrategy = new Class({ initialize:function() { }, diff --git a/mindplot/src/main/javascript/layout/EventBusDispatcher.js b/mindplot/src/main/javascript/layout/EventBusDispatcher.js index bdecb43e..b70a2939 100644 --- a/mindplot/src/main/javascript/layout/EventBusDispatcher.js +++ b/mindplot/src/main/javascript/layout/EventBusDispatcher.js @@ -15,14 +15,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.EventBusDispatcher = new Class({ +mindplot.layout.EventBusDispatcher = new Class({ initialize:function(designerModel) { $assert(designerModel, "designerModel cannot be null"); this.registerBusEvents(); var size = {width:25,height:25}; - this._layoutManager = new mindplot.nlayout.LayoutManager(0, size); + this._layoutManager = new mindplot.layout.LayoutManager(0, size); this._layoutManager.addEvent('change', function(event) { var id = event.getId(); @@ -51,7 +51,7 @@ mindplot.nlayout.EventBusDispatcher = new Class({ }, _nodeMoveEvent: function(node) { - console.log("mindplot.nlayout.EventBusDispatcher._nodeMoveEvent: Not Implemented yet"); + console.log("mindplot.layout.EventBusDispatcher._nodeMoveEvent: Not Implemented yet"); }, @@ -65,7 +65,7 @@ mindplot.nlayout.EventBusDispatcher = new Class({ }, _nodeRepositionateEvent: function(node) { - console.log("mindplot.nlayout.EventBusDispatcher._nodeRepositionateEvent: Not Implemented yet"); + console.log("mindplot.layout.EventBusDispatcher._nodeRepositionateEvent: Not Implemented yet"); }, diff --git a/mindplot/src/main/javascript/layout/GridSorter.js b/mindplot/src/main/javascript/layout/GridSorter.js index 21679022..1d434bbc 100644 --- a/mindplot/src/main/javascript/layout/GridSorter.js +++ b/mindplot/src/main/javascript/layout/GridSorter.js @@ -15,8 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.GridSorter = new Class({ - Extends: mindplot.nlayout.AbstractBasicSorter, +mindplot.layout.GridSorter = new Class({ + Extends: mindplot.layout.AbstractBasicSorter, computeOffsets: function(treeSet, node) { $assert(treeSet, "treeSet can no be null."); @@ -43,7 +43,7 @@ mindplot.nlayout.GridSorter = new Class({ var finalHeight = i == 0 ? 0 : heights[i].height/2 * even; var yOffset = zeroHeight + middleHeight +finalHeight; - var xOffset = node.getSize().width + mindplot.nlayout.GridSorter.GRID_HORIZONTAR_SIZE; + var xOffset = node.getSize().width + mindplot.layout.GridSorter.GRID_HORIZONTAR_SIZE; $assert(!isNaN(xOffset), "xOffset can not be null"); $assert(!isNaN(yOffset), "yOffset can not be null"); @@ -60,6 +60,6 @@ mindplot.nlayout.GridSorter = new Class({ }); -mindplot.nlayout.GridSorter.GRID_HORIZONTAR_SIZE = 20; -mindplot.nlayout.GridSorter.INTER_NODE_VERTICAL_DISTANCE = 50; +mindplot.layout.GridSorter.GRID_HORIZONTAR_SIZE = 20; +mindplot.layout.GridSorter.INTER_NODE_VERTICAL_DISTANCE = 50; diff --git a/mindplot/src/main/javascript/layout/LayoutManager.js b/mindplot/src/main/javascript/layout/LayoutManager.js index befe6fde..184eeb7d 100644 --- a/mindplot/src/main/javascript/layout/LayoutManager.js +++ b/mindplot/src/main/javascript/layout/LayoutManager.js @@ -15,14 +15,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.LayoutManager = new Class({ +mindplot.layout.LayoutManager = new Class({ Extends: Events, initialize: function(rootNodeId, rootSize) { $assert($defined(rootNodeId), "rootNodeId can not be null"); $assert(rootSize, "rootSize can not be null"); - this._treeSet = new mindplot.nlayout.RootedTreeSet(); - this._layout = new mindplot.nlayout.OriginalLayout(this._treeSet); + this._treeSet = new mindplot.layout.RootedTreeSet(); + this._layout = new mindplot.layout.OriginalLayout(this._treeSet); var rootNode = this._layout.createNode(rootNodeId, rootSize, {x:0,y:0}, 'root'); this._treeSet.setRoot(rootNode); @@ -145,7 +145,7 @@ mindplot.nlayout.LayoutManager = new Class({ return event.id == id; }); if (!event) { - event = new mindplot.nlayout.ChangeEvent(id); + event = new mindplot.layout.ChangeEvent(id); } // Update nodes ... diff --git a/mindplot/src/main/javascript/layout/Node.js b/mindplot/src/main/javascript/layout/Node.js index 436299c2..84b9c031 100644 --- a/mindplot/src/main/javascript/layout/Node.js +++ b/mindplot/src/main/javascript/layout/Node.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.Node = new Class({ +mindplot.layout.Node = new Class({ initialize:function(id, size, position, sorter) { $assert(typeof id === 'number' && isFinite(id), "id can not be null"); $assert(size, "size can not be null"); diff --git a/mindplot/src/main/javascript/layout/OriginalLayout.js b/mindplot/src/main/javascript/layout/OriginalLayout.js index c82dea78..0444e16a 100644 --- a/mindplot/src/main/javascript/layout/OriginalLayout.js +++ b/mindplot/src/main/javascript/layout/OriginalLayout.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.OriginalLayout = new Class({ +mindplot.layout.OriginalLayout = new Class({ initialize: function(treeSet) { this._treeSet = treeSet; }, @@ -27,9 +27,9 @@ mindplot.nlayout.OriginalLayout = new Class({ $assert(type, "type can not be null"); var strategy = type === 'root' ? - mindplot.nlayout.OriginalLayout.BALANCED_SORTER : - mindplot.nlayout.OriginalLayout.SYMMETRIC_SORTER; - return new mindplot.nlayout.Node(id, size, position, strategy); + mindplot.layout.OriginalLayout.BALANCED_SORTER : + mindplot.layout.OriginalLayout.SYMMETRIC_SORTER; + return new mindplot.layout.Node(id, size, position, strategy); }, connectNode: function(parentId, childId, order) { @@ -121,8 +121,8 @@ mindplot.nlayout.OriginalLayout = new Class({ }); -mindplot.nlayout.OriginalLayout.SYMMETRIC_SORTER = new mindplot.nlayout.SymmetricSorter(); -mindplot.nlayout.OriginalLayout.BALANCED_SORTER = new mindplot.nlayout.BalancedSorter(); +mindplot.layout.OriginalLayout.SYMMETRIC_SORTER = new mindplot.layout.SymmetricSorter(); +mindplot.layout.OriginalLayout.BALANCED_SORTER = new mindplot.layout.BalancedSorter(); diff --git a/mindplot/src/main/javascript/layout/RootedTreeSet.js b/mindplot/src/main/javascript/layout/RootedTreeSet.js index 01392082..f1133c23 100644 --- a/mindplot/src/main/javascript/layout/RootedTreeSet.js +++ b/mindplot/src/main/javascript/layout/RootedTreeSet.js @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.RootedTreeSet = new Class({ +mindplot.layout.RootedTreeSet = new Class({ initialize:function() { this._rootNodes = []; }, diff --git a/mindplot/src/main/javascript/layout/SymmetricSorter.js b/mindplot/src/main/javascript/layout/SymmetricSorter.js index ae50a611..756c580a 100644 --- a/mindplot/src/main/javascript/layout/SymmetricSorter.js +++ b/mindplot/src/main/javascript/layout/SymmetricSorter.js @@ -15,8 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.SymmetricSorter = new Class({ - Extends: mindplot.nlayout.AbstractBasicSorter, +mindplot.layout.SymmetricSorter = new Class({ + Extends: mindplot.layout.AbstractBasicSorter, initialize:function() { }, @@ -29,7 +29,7 @@ mindplot.nlayout.SymmetricSorter = new Class({ if (children.length == 0) { position = position || {x:parent.getPosition().x + direction, y:parent.getPosition().y}; var position = { - x: parent.getPosition().x + direction * (parent.getSize().width + mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING), + x: parent.getPosition().x + direction * (parent.getSize().width + mindplot.layout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING), y:parent.getPosition().y } return [0, position]; @@ -43,7 +43,7 @@ mindplot.nlayout.SymmetricSorter = new Class({ var cpos = child.getPosition(); if (position.y > cpos.y) { yOffset = child == last ? - child.getSize().height + mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 : + child.getSize().height + mindplot.layout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 : (children[index + 1].getPosition().y + children[index + 1].getSize().height/2 - child.getPosition().y)/2; result = [child.getOrder() + 1,{x:cpos.x, y:cpos.y + yOffset}]; } @@ -54,7 +54,7 @@ mindplot.nlayout.SymmetricSorter = new Class({ var first = children[0]; result = [0, { x:first.getPosition().x, - y:first.getPosition().y - first.getSize().height - mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 + y:first.getPosition().y - first.getSize().height - mindplot.layout.SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 }]; } @@ -116,7 +116,7 @@ mindplot.nlayout.SymmetricSorter = new Class({ var direction = parent.getPosition().x > 0 ? 1 : -1; var yOffset = ysum + heights[i].height / 2; - var xOffset = direction * (heights[i].width/2 + node.getSize().width/2 + mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING); + var xOffset = direction * (heights[i].width/2 + node.getSize().width/2 + mindplot.layout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING); $assert(!isNaN(xOffset), "xOffset can not be null"); $assert(!isNaN(yOffset), "yOffset can not be null"); @@ -140,7 +140,7 @@ mindplot.nlayout.SymmetricSorter = new Class({ } }); -mindplot.nlayout.SymmetricSorter.INTERNODE_VERTICAL_PADDING = 5; -mindplot.nlayout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING = 30; +mindplot.layout.SymmetricSorter.INTERNODE_VERTICAL_PADDING = 5; +mindplot.layout.SymmetricSorter.INTERNODE_HORIZONTAL_PADDING = 30; diff --git a/mindplot/src/test/javascript/static/TestSuite.js b/mindplot/src/test/javascript/static/TestSuite.js index 4ab756d0..4244ac33 100644 --- a/mindplot/src/test/javascript/static/TestSuite.js +++ b/mindplot/src/test/javascript/static/TestSuite.js @@ -15,8 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -mindplot.nlayout.TestSuite = new Class({ - Extends: mindplot.nlayout.ChildrenSorterStrategy, +mindplot.layout.TestSuite = new Class({ + Extends: mindplot.layout.ChildrenSorterStrategy, initialize:function() { this.testAligned(); @@ -35,12 +35,12 @@ mindplot.nlayout.TestSuite = new Class({ testAligned: function() { var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.connectNode(1, 2, 0); manager.connectNode(2, 3, 0); @@ -58,22 +58,22 @@ mindplot.nlayout.TestSuite = new Class({ testSymmetry: function() { var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(12, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(13, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(14, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(12, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(13, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(14, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 14, 0); manager.connectNode(14, 13, 0); manager.connectNode(13, 1, 0); @@ -103,79 +103,79 @@ mindplot.nlayout.TestSuite = new Class({ testBalanced: function() { var position = {x:0, y:0}; var plotsize = {width:1000, height:200}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.layout(); manager.plot("testBalanced1", plotsize); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 2, 1); manager.layout(); manager.plot("testBalanced2", plotsize); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 3, 2); manager.layout(); manager.plot("testBalanced3", plotsize); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 4, 3); manager.layout(); manager.plot("testBalanced4", plotsize); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 5, 4); manager.layout(); manager.plot("testBalanced5", plotsize); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 6, 5); manager.layout(); manager.plot("testBalanced6", plotsize); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(3, 7, 0) manager.connectNode(7, 8, 0) manager.connectNode(7, 9, 1); manager.layout(); manager.plot("testBalanced7", plotsize); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(12, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(12, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(6, 10, 0) manager.connectNode(10, 11, 0) manager.connectNode(10, 12, 1); manager.layout(); manager.plot("testBalanced8", plotsize); - manager.addNode(13, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(13, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 13, 4); manager.layout(); manager.plot("testBalanced9", {width:1000, height:400}); - manager.addNode(14, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(14, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 14, 5); manager.layout(); manager.plot("testBalanced10", {width:1000, height:400}); - manager.addNode(15, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(15, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 15, 4); manager.layout(); manager.plot("testBalanced11", {width:1000, height:400}); - manager.addNode(16, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(16, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 16, 25); manager.layout(); manager.plot("testBalanced12", {width:1000, height:400}); - manager.addNode(17, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(18, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(19, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(17, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(18, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(19, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 17, 11); manager.connectNode(0, 18, 13); manager.connectNode(0, 19, 10); @@ -202,13 +202,13 @@ mindplot.nlayout.TestSuite = new Class({ testEvents: function() { console.log("testEvents:"); var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); // Add 3 nodes... - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, {x:0, y: 60}); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, {x:0, y: 60}); // Now connect one with two.... manager.connectNode(0, 1, 0); @@ -239,15 +239,15 @@ mindplot.nlayout.TestSuite = new Class({ testEventsComplex: function() { console.log("testEventsComplex:"); var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); // Add 3 nodes... - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, {x:0, y:60}); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, {x:0, y:60}); // Now connect one with two.... manager.connectNode(0, 1, 0); @@ -283,16 +283,16 @@ mindplot.nlayout.TestSuite = new Class({ testDisconnect: function() { console.log("testDisconnect:"); var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); // Prepare a sample graph ... - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.connectNode(1, 2, 0); @@ -341,20 +341,20 @@ mindplot.nlayout.TestSuite = new Class({ testReconnect: function() { var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(12, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(12, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.connectNode(0, 2, 1); manager.connectNode(0, 3, 2); @@ -389,18 +389,18 @@ mindplot.nlayout.TestSuite = new Class({ testRemoveNode: function() { console.log("testRemoveNode:"); var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); // Prepare a sample graph ... - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.connectNode(0, 5, 1); @@ -447,20 +447,20 @@ mindplot.nlayout.TestSuite = new Class({ testSymmetricPredict: function() { console.log("testSymmetricPredict:"); var position = {x:0,y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); // Prepare a sample graph ... - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(6, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(6, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0, 1, 0); manager.connectNode(0, 2, 1); @@ -513,18 +513,18 @@ mindplot.nlayout.TestSuite = new Class({ testBalancedPredict: function() { console.log("testBalancedPredict"); var position = {x:0, y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); - manager.addNode(1, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(3, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(7, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(9, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(1, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(3, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(7, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(9, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0,1,0); manager.connectNode(0,2,1); @@ -581,31 +581,31 @@ mindplot.nlayout.TestSuite = new Class({ _plotPrediction: function(canvas, prediction) { console.log("\t\tprediction {order:" + prediction[0] + ", position: (" + prediction.getLast().x + "," + prediction.getLast().y + ")}"); - var cx = prediction.getLast().x + canvas.width / 2 - mindplot.nlayout.TestSuite.NODE_SIZE.width / 2; - var cy = prediction.getLast().y + canvas.height / 2 - mindplot.nlayout.TestSuite.NODE_SIZE.height / 2; - canvas.rect(cx, cy, mindplot.nlayout.TestSuite.NODE_SIZE.width, mindplot.nlayout.TestSuite.NODE_SIZE.height); + var cx = prediction.getLast().x + canvas.width / 2 - mindplot.layout.TestSuite.NODE_SIZE.width / 2; + var cy = prediction.getLast().y + canvas.height / 2 - mindplot.layout.TestSuite.NODE_SIZE.height / 2; + canvas.rect(cx, cy, mindplot.layout.TestSuite.NODE_SIZE.width, mindplot.layout.TestSuite.NODE_SIZE.height); }, testSize: function() { var position = {x:0, y:0}; - var manager = new mindplot.nlayout.LayoutManager(0, mindplot.nlayout.TestSuite.ROOT_NODE_SIZE); + var manager = new mindplot.layout.LayoutManager(0, mindplot.layout.TestSuite.ROOT_NODE_SIZE); manager.addNode(1, {width: 60, height: 60}, position); - manager.addNode(2, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(2, mindplot.layout.TestSuite.NODE_SIZE, position); manager.addNode(3, {width: 260, height: 30}, position); - manager.addNode(4, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(5, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(4, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(5, mindplot.layout.TestSuite.NODE_SIZE, position); manager.addNode(7, {width: 80, height: 80}, position); - manager.addNode(8, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(8, mindplot.layout.TestSuite.NODE_SIZE, position); manager.addNode(9, {width: 30, height: 30}, position); - manager.addNode(10, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(11, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(10, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(11, mindplot.layout.TestSuite.NODE_SIZE, position); manager.addNode(12, {width: 100, height: 70}, position); - manager.addNode(13, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(14, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(15, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(16, mindplot.nlayout.TestSuite.NODE_SIZE, position); - manager.addNode(17, mindplot.nlayout.TestSuite.NODE_SIZE, position); + manager.addNode(13, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(14, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(15, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(16, mindplot.layout.TestSuite.NODE_SIZE, position); + manager.addNode(17, mindplot.layout.TestSuite.NODE_SIZE, position); manager.connectNode(0,1,0); manager.connectNode(1,16,0); @@ -641,6 +641,6 @@ mindplot.nlayout.TestSuite = new Class({ } }); -mindplot.nlayout.TestSuite.NODE_SIZE = {width:80, height:30}, -mindplot.nlayout.TestSuite.ROOT_NODE_SIZE = {width:120, height:40} +mindplot.layout.TestSuite.NODE_SIZE = {width:80, height:30}, +mindplot.layout.TestSuite.ROOT_NODE_SIZE = {width:120, height:40} diff --git a/mindplot/src/test/javascript/static/layout.html b/mindplot/src/test/javascript/static/layout.html index d817a728..40b60309 100644 --- a/mindplot/src/test/javascript/static/layout.html +++ b/mindplot/src/test/javascript/static/layout.html @@ -7,17 +7,17 @@ - - + + - - - - - - - - + + + + + + + + @@ -27,7 +27,7 @@