How to handle unified touch and mouse input with Pointer Events?
Bind pointerdown, pointermove, pointerup and pointercancel instead of separate mouse and touch listeners. Pointer Events fire for mouse, touch and pen from one API, carry a pointerId for multi-touch, and need touch-action: none in CSS to stop the browser from scrolling or zooming the canvas.