mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-22 19:33:48 +01:00
Fixed node insert bug
This commit is contained in:
parent
1b9a20adad
commit
bf212e649a
@ -102,6 +102,12 @@ mindplot.layout.BalancedSorter = new Class({
|
||||
insert: function(treeSet, parent, child, order) {
|
||||
var children = this._getChildrenForOrder(parent, treeSet, order);
|
||||
|
||||
// If no children, return 0 or 1 depending on the side
|
||||
if (children.length == 0) {
|
||||
child.setOrder(order % 2);
|
||||
return;
|
||||
}
|
||||
|
||||
// Shift all the elements by two, so side is the same.
|
||||
// In case of balanced sorter, order don't need to be continuous...
|
||||
var max = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user