Visual representation of nodes. Symetric sorter updated

This commit is contained in:
Gonzalo Bellver
2011-12-30 17:48:11 -03:00
parent 9ed6df2158
commit 14cb5b586e
8 changed files with 111 additions and 27 deletions

View File

@@ -48,12 +48,15 @@ mindplot.nlayout.OriginalLayout = new Class({
layout: function() {
var roots = this._treeSet.getTreeRoots();
roots.forEach(function(node) {
console.log('node = ' + node.getId()); //TODO(gb): Remove trace!!!
// Calculate all node heights ...
var sorter = node.getSorter();
console.log('sorter = ' + sorter); //TODO(gb): Remove trace!!!
// @Todo: This must not be implemented in this way.Each sorter could have different notion of heights ...
var heightById = sorter.computeChildrenIdByHeights(this._treeSet, node);
console.log('heightById = ' + heightById[0]); //TODO(gb): Remove trace!!!
this._layoutChildren(node, heightById);
}, this);