removing .bind mootools call (phase 1/2)

This commit is contained in:
Ezequiel Bergamaschi
2014-07-06 01:15:34 -03:00
parent 3655df6cb8
commit f2b0eb74ea
17 changed files with 126 additions and 120 deletions

View File

@@ -107,12 +107,12 @@ mindplot.layout.OriginalLayout = new Class({
var sorter = node.getSorter();
var offsetById = sorter.computeOffsets(this._treeSet, node);
var parentPosition = node.getPosition();
var me = this;
_.each(children, function (child) {
var offset = offsetById[child.getId()];
var childFreeDisplacement = child.getFreeDisplacement();
var direction = node.getSorter().getChildDirection(this._treeSet, child);
var direction = node.getSorter().getChildDirection(me._treeSet, child);
if ((direction > 0 && childFreeDisplacement.x < 0) || (direction < 0 && childFreeDisplacement.x > 0)) {
child.resetFreeDisplacement();
@@ -125,9 +125,9 @@ mindplot.layout.OriginalLayout = new Class({
var parentX = parentPosition.x;
var parentY = parentPosition.y;
var newPos = {x:parentX + offset.x, y:parentY + offset.y + this._calculateAlignOffset(node, child, heightById)};
this._treeSet.updateBranchPosition(child, newPos);
}.bind(this));
var newPos = {x:parentX + offset.x, y:parentY + offset.y + me._calculateAlignOffset(node, child, heightById)};
me._treeSet.updateBranchPosition(child, newPos);
});
node._branchHeight = newBranchHeight;
}