Minor performance improvement...

This commit is contained in:
Paulo Gustavo Veiga
2012-07-07 13:18:27 -03:00
parent f3da916965
commit 80940b8529
7 changed files with 83 additions and 81 deletions

View File

@@ -111,14 +111,15 @@ mindplot.model.Mindmap = new Class({
},
findNodeById:function (id) {
var result;
for (var i = 0; i < this._branches; i++) {
var result = null;
for (var i = 0; i < this._branches.length; i++) {
var branch = this._branches[i];
result = branch.findNodeById(id)
result = branch.findNodeById(id);
if (result) {
break;
}
}
return result;
}
}
);