replacing old .each mootools' method by _.each
This commit is contained in:
@@ -135,7 +135,7 @@ mindplot.model.IMindmap = new Class({
|
||||
|
||||
// Then the rest of the branches ...
|
||||
var sbranchs = source.getBranches();
|
||||
sbranchs.each(function(snode) {
|
||||
_.each(sbranchs, function(snode) {
|
||||
var tnode = target.createNode(snode.getType(), snode.getId());
|
||||
snode.copyTo(tnode);
|
||||
target.addBranch(tnode);
|
||||
|
@@ -213,7 +213,7 @@ mindplot.model.INodeModel = new Class({
|
||||
var source = this;
|
||||
// Copy properties ...
|
||||
var keys = source.getPropertiesKeys();
|
||||
keys.each(function(key) {
|
||||
_.each(keys, function(key) {
|
||||
var value = source.getProperty(key);
|
||||
target.putProperty(key, value);
|
||||
});
|
||||
@@ -222,7 +222,7 @@ mindplot.model.INodeModel = new Class({
|
||||
var children = this.getChildren();
|
||||
var tmindmap = target.getMindmap();
|
||||
|
||||
children.each(function(snode) {
|
||||
_.each(function(children, snode) {
|
||||
var tnode = tmindmap.createNode(snode.getType(), snode.getId());
|
||||
snode.copyTo(tnode);
|
||||
target.append(tnode);
|
||||
@@ -278,10 +278,10 @@ mindplot.model.INodeModel = new Class({
|
||||
var children = this.getChildren();
|
||||
if (children.length > 0) {
|
||||
result = result + ", children: {(size:" + children.length;
|
||||
children.each(function(node) {
|
||||
_.each(children, function(node) {
|
||||
result = result + "=> (";
|
||||
var keys = node.getPropertiesKeys();
|
||||
keys.each(function(key) {
|
||||
_.each(keys, function(key) {
|
||||
var value = node.getProperty(key);
|
||||
result = result + key + ":" + value + ",";
|
||||
});
|
||||
|
Reference in New Issue
Block a user