replacing old .each mootools' method by _.each

This commit is contained in:
Ezequiel Bergamaschi
2014-03-17 00:36:29 -03:00
parent 2f29dfe203
commit e9f4b0c7d8
26 changed files with 63 additions and 62 deletions

View File

@@ -77,7 +77,7 @@ mindplot.layout.BalancedSorter = new Class({
var result = null;
var last = children.getLast();
position = position || {x:last.getPosition().x, y:last.getPosition().y + 1};
children.each(function (child, index) {
_.each(children, function (child, index) {
var cpos = child.getPosition();
if (position.y > cpos.y) {
yOffset = child == last ?
@@ -129,7 +129,7 @@ mindplot.layout.BalancedSorter = new Class({
// Filter nodes on one side..
var children = this._getChildrenForOrder(parent, treeSet, node.getOrder());
children.each(function (child, index) {
_.each(children, function (child, index) {
if (child.getOrder() > node.getOrder()) {
child.setOrder(child.getOrder() - 2);
}
@@ -154,7 +154,7 @@ mindplot.layout.BalancedSorter = new Class({
var totalPHeight = 0;
var totalNHeight = 0;
heights.each(function (elem) {
_.each(heights, function (elem) {
if (elem.order % 2 == 0) {
totalPHeight += elem.height;
} else {