Free Position tests asserted

This commit is contained in:
Gonzalo Bellver
2012-01-26 13:07:45 -03:00
parent 402226afbc
commit 9ada52d720
9 changed files with 116 additions and 18 deletions

View File

@@ -109,6 +109,8 @@ mindplot.layout.LayoutManager = new Class({
if (free) {
$assert($defined(position), "position cannot be null for predict in free positioning");
//TODO(gb): check this. Should direction be obtained by the sorter?
var rootNode = this._treeSet.getRootNode(parent);
var direction = parent.getPosition().x > rootNode.getPosition().x ? 1 : -1;