DEV Community

Cover image for Quick Touch Events
Zevan Rosser
Zevan Rosser

Posted on


Quick Touch Events

Draw with your mouse by clicking, holding down and dragging…

I often use some variation of this depending on the project… This snippet normalizes touch events in a simple way, prevents scrolling and gives an example of how to handle multi-touch.

You’ll probably want a to use a meta tag like this – for the full effect.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
Enter fullscreen mode Exit fullscreen mode

See more stuff like this over @ Snippet Zone

Top comments (0)