- Minor fixes
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user