removing .bind mootools call (phase 1/2)

This commit is contained in:
Ezequiel Bergamaschi
2014-07-06 01:15:34 -03:00
parent fb5546111e
commit fe59b1ce46
17 changed files with 126 additions and 120 deletions

View File

@@ -46,10 +46,11 @@ mindplot.commands.GenericFunctionCommand = new Class({
}
if (topics != null) {
var me = this;
_.each(topics, function (topic) {
var oldValue = this._commandFunc(topic, this._value);
this._oldValues.push(oldValue);
}.bind(this));
var oldValue = me._commandFunc(topic, me._value);
me._oldValues.push(oldValue);
});
}
this.applied = true;
@@ -62,10 +63,11 @@ mindplot.commands.GenericFunctionCommand = new Class({
undoExecute:function (commandContext) {
if (this.applied) {
var topics = commandContext.findTopics(this._topicsId);
var me = this;
_.each(topics, function (topic, index) {
this._commandFunc(topic, this._oldValues[index]);
me._commandFunc(topic, me._oldValues[index]);
}.bind(this));
});
this.applied = false;
this._oldValues = [];