fix unnecessary onScreenEvent change. fixes #142.
This commit is contained in:
parent
8228142060
commit
f3f4233a7a
|
@ -859,28 +859,16 @@ Element.prototype.disableDrag = function() {
|
|||
};
|
||||
|
||||
Element.prototype.key = function(key, listener) {
|
||||
// return this.screen.program.key.apply(this, arguments);
|
||||
if (typeof key === 'string') key = key.split(/\s*,\s*/);
|
||||
key.forEach(function(key) {
|
||||
return this.onScreenEvent('key ' + key, listener);
|
||||
}, this);
|
||||
return this.screen.program.key.apply(this, arguments);
|
||||
};
|
||||
|
||||
Element.prototype.onceKey = function(key, listener) {
|
||||
// return this.screen.program.onceKey.apply(this, arguments);
|
||||
if (typeof key === 'string') key = key.split(/\s*,\s*/);
|
||||
key.forEach(function(key) {
|
||||
return this.onceScreenEvent('key ' + key, listener);
|
||||
}, this);
|
||||
return this.screen.program.onceKey.apply(this, arguments);
|
||||
};
|
||||
|
||||
Element.prototype.unkey =
|
||||
Element.prototype.removeKey = function(key, listener) {
|
||||
// return this.screen.program.unkey.apply(this, arguments);
|
||||
if (typeof key === 'string') key = key.split(/\s*,\s*/);
|
||||
key.forEach(function(key) {
|
||||
return this.removeScreenEvent('key ' + key, listener);
|
||||
}, this);
|
||||
return this.screen.program.unkey.apply(this, arguments);
|
||||
};
|
||||
|
||||
Element.prototype.setIndex = function(index) {
|
||||
|
|
Loading…
Reference in New Issue