disable all other events onWheel() if (!e.ctrlKey) { this.timeout && clearTimeout(this.timeout) this.timeout = setTimeout(() => { this.setPointerState() this.deltaX = 0 this.deltaY = 0 }, 250) if (!this.startPointerInfo) { this.setPointerState([e]) this.deltaX = 0 this.deltaY = 0 } this.deltaX -= e.deltaX this.deltaY -= e.deltaY this.onDrag(e) // Your trackpad X and Y positions return } if (this.props.disableZoom) { return; } const scaleChange = 20 ** (e.deltaY * 0.002) onDrag() const dragX = this.deltaX// pointer.clientX - startPointer.clientX const dragY = this.deltaY// pointer.clientY - startPointer.clientY