-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I love ManyTinyThings and look forward to using it to enlighten my physics students.
Currently ManyTinyThings.github.io doesn't work on mobile devices. Fixing this isn't too difficult:
- Change the mouse events on the Canvas elements to pointer events. This can be done by just changing the first argument to the
*.addEventListener()calls."mousedown"becomes"pointerdown", etc. Since PointerEvent is derived from MouseEvent, the handler code still works. - Update the style of the simulation canvas elements to include
touch-action: none;or maybetouch-action: pinch-zoom;. This prevents the browser from intercepting the pointer events for scrolling of the page. (As a side effect, the user has to scroll by dragging from outside the canvas.)
-Jeff
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels