replacing old .each mootools' method by _.each

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

View File

@@ -32,7 +32,7 @@ mindplot.persistence.Beta2PelaMigrator = new Class({
// Beta does not set position on second level nodes ...
var branches = mindmap.getBranches();
branches.each(function (model) {
_.each(branches, function (model) {
this._fixPosition(model);
}.bind(this));
@@ -42,7 +42,7 @@ mindplot.persistence.Beta2PelaMigrator = new Class({
_fixPosition:function (parentModel) {
var parentPos = parentModel.getPosition();
var isRight = parentPos.x > 0;
parentModel.getChildren().each(function (child) {
_.each(parentModel.getChildren(), function (child) {
if (!child.getPosition()) {
child.setPosition(parentPos.x + (50 * isRight ? 1 : -1), parentPos.y);
}