Browse Source

Up onWheel

pull/5337/head
Artur Arseniev 3 years ago
parent
commit
228b87324f
  1. 3
      src/canvas/view/CanvasView.ts

3
src/canvas/view/CanvasView.ts

@ -165,7 +165,7 @@ export default class CanvasView extends ModuleView<Canvas> {
}; };
} }
onPointer(ev: PointerEvent) { onPointer(ev: WheelEvent) {
if (!this.config.infiniteCanvas) return; if (!this.config.infiniteCanvas) return;
const canvasRect = this.getCanvasOffset(); const canvasRect = this.getCanvasOffset();
@ -201,6 +201,7 @@ export default class CanvasView extends ModuleView<Canvas> {
onWheel(ev: WheelEvent) { onWheel(ev: WheelEvent) {
const { module, config } = this; const { module, config } = this;
if (config.infiniteCanvas) { if (config.infiniteCanvas) {
navigator.maxTouchPoints && this.onPointer(ev);
this.preventDefault(ev); this.preventDefault(ev);
const { deltaX, deltaY } = ev; const { deltaX, deltaY } = ev;
const zoom = module.getZoomDecimal(); const zoom = module.getZoomDecimal();

Loading…
Cancel
Save