diff --git a/src/absulit.points.module.js b/src/absulit.points.module.js index 7d3b0bd5..832ef2fc 100644 --- a/src/absulit.points.module.js +++ b/src/absulit.points.module.js @@ -118,7 +118,7 @@ export default class Points { this._canvas.addEventListener('click', e => { this._mouseClick = true; }); - this._canvas.addEventListener('mousemove', this._onMouseMove); + this._canvas.addEventListener('mousemove', this._onMouseMove, { passive: true }); this._canvas.addEventListener('mousedown', e => { this._mouseDown = true; }); @@ -129,7 +129,7 @@ export default class Points { this._canvas.addEventListener('wheel', e => { this._mouseWheel = true; this._mouseDelta = [e.deltaX, e.deltaY]; - }); + }, { passive: true }); this._originalCanvasWidth = this._canvas.clientWidth; this._originalCanvasHeigth = this._canvas.clientHeight; window.addEventListener('resize', this._resizeCanvasToFitWindow, false);