补充修改card 复制粘贴的问题
This commit is contained in:
parent
d331d4d2ca
commit
ff3aa9bc45
@ -33,7 +33,8 @@ class Iscs {
|
||||
const height = opts.config.height;
|
||||
this.isAllowDragging = false;
|
||||
this.$iscsZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
|
||||
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
|
||||
this.$iscsZr.dom.setAttribute('tabIndex', -1);
|
||||
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
|
||||
this.$mouseController = new MouseController(this);
|
||||
|
||||
this.$mouseController.enable();
|
||||
|
@ -19,7 +19,8 @@ class KeyboardController extends Eventful {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
dom.focus();
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
@ -33,6 +34,7 @@ class KeyboardController extends Eventful {
|
||||
}
|
||||
|
||||
keydown(e) {
|
||||
console.log(e, 111111111111111)
|
||||
if (this._keyOnDownUp && !e.repeat) {
|
||||
const currentEvent = keyboardEvents[e.key.toUpperCase()]||{event:""};
|
||||
this.trigger(this.events.Keyboard, currentEvent.event);
|
||||
|
@ -22,6 +22,7 @@ class KeyboardController extends Eventful {
|
||||
|
||||
dom.addEventListener('keydown', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keyupHandle, false);
|
||||
dom.focus();
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
|
@ -44,7 +44,7 @@ class Jlmap {
|
||||
this.zoomOnMouseWheel = opts.options.zoomOnMouseWheel;
|
||||
|
||||
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
|
||||
|
||||
this.$zr.dom.setAttribute('tabIndex', -1);
|
||||
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
|
||||
this.$painter = new Painter(this);
|
||||
this.$painter.updateZrSize({width: this.$zr.getWidth(), height: this.$zr.getHeight()});
|
||||
|
@ -20,7 +20,8 @@ class KeyboardController extends Eventful {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
dom.focus();
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
|
@ -54,6 +54,7 @@ class Jlmap {
|
||||
this.previewOrMapDraw = opts.showConfig.previewOrMapDraw;
|
||||
|
||||
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
|
||||
this.$zr.dom.setAttribute('tabIndex', -1);
|
||||
|
||||
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
|
||||
this.$painter = new Painter(this);
|
||||
|
Loading…
Reference in New Issue
Block a user