Added support for predict when dragging a symmetric sorted node

This commit is contained in:
Gonzalo Bellver
2012-02-02 12:15:59 -03:00
parent d632a079b1
commit a0b838a7a6
5 changed files with 76 additions and 10 deletions

View File

@@ -58,6 +58,11 @@ mindplot.layout.AbstractBasicSorter = new Class({
return a.getOrder() - b.getOrder()
});
return result;
},
_getRelativeDirection: function(reference, position) {
var offset = position.x - reference.x;
return offset > 0 ? 1 : (offset < 0 ? -1 : 0);
}
});