- Minor fixes

This commit is contained in:
Paulo Gustavo Veiga
2012-09-27 08:12:03 -03:00
parent 3d1dc9bfc6
commit 4a0d70e3b3
2 changed files with 8 additions and 9 deletions

View File

@@ -24,14 +24,14 @@ mindplot.commands.GenericFunctionCommand = new Class({
this.parent();
this._value = value;
this._topicsIds = topicsIds;
this._topicsId = topicsIds;
this._commandFunc = commandFunc;
this._oldValues = [];
},
execute: function(commandContext) {
if (!this.applied) {
var topics = commandContext.findTopics(this._topicsIds);
var topics = commandContext.findTopics(this._topicsId);
topics.each(function(topic) {
var oldValue = this._commandFunc(topic, this._value);
this._oldValues.push(oldValue);
@@ -45,7 +45,7 @@ mindplot.commands.GenericFunctionCommand = new Class({
undoExecute: function(commandContext) {
if (this.applied) {
var topics = commandContext.findTopics(this._topicsIds);
var topics = commandContext.findTopics(this._topicsId);
topics.each(function(topic, index) {
this._commandFunc(topic, this._oldValues[index]);