Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
082144ee01
@ -13,16 +13,17 @@ class KeyboardController extends Eventful {
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
var keydownHandle = this.keydown.bind(this);
|
||||
var dom = this.$zr.dom;
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
window.addEventListener('keyup', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
window.removeEventListener('keyup', keydownHandle, false);
|
||||
dom.removeEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
|
@ -13,19 +13,20 @@ class KeyboardController extends Eventful {
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
var keydownHandle = this.keydown.bind(this);
|
||||
var keyupHandle = this.keyup.bind(this);
|
||||
var keyupHandle = this.keyup.bind(this);
|
||||
var dom = this.$zr.dom;
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
window.addEventListener('keydown', keydownHandle, false);
|
||||
window.addEventListener('keyup', keyupHandle, false);
|
||||
dom.addEventListener('keydown', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keyupHandle, false);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
window.removeEventListener('keydown', keydownHandle, false);
|
||||
window.removeEventListener('keyup', keyupHandle, false);
|
||||
dom.removeEventListener('keydown', keydownHandle, false);
|
||||
dom.removeEventListener('keyup', keyupHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
|
@ -14,16 +14,17 @@ class KeyboardController extends Eventful {
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
var keydownHandle = this.keydown.bind(this);
|
||||
var dom = this.$zr.dom;
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
window.addEventListener('keyup', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
window.removeEventListener('keyup', keydownHandle, false);
|
||||
dom.removeEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user