- Change forEach for each interator

- Fix issue deleting nodes with intermediate relationships
This commit is contained in:
Paulo Gustavo Veiga
2012-07-08 19:31:21 -03:00
parent 8175eea928
commit 39c2b37a1f
24 changed files with 521 additions and 508 deletions

View File

@@ -32,7 +32,7 @@ mindplot.commands.GenericFunctionCommand = new Class({
execute: function(commandContext) {
if (!this.applied) {
var topics = commandContext.findTopics(this._topicsIds);
topics.forEach(function(topic) {
topics.each(function(topic) {
var oldValue = this._commandFunc(topic, this._value);
this._oldValues.push(oldValue);
}.bind(this));
@@ -46,7 +46,7 @@ mindplot.commands.GenericFunctionCommand = new Class({
undoExecute: function(commandContext) {
if (this.applied) {
var topics = commandContext.findTopics(this._topicsIds);
topics.forEach(function(topic, index) {
topics.each(function(topic, index) {
this._commandFunc(topic, this._oldValues[index]);
}.bind(this));