This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joel Leví Hernández
Posted Nov 09 - Read on Facebook

Hi guys, how can I get the coordinates of the TouchMove event?

5 Comments

Joel Leví Hernández

On my mac I can get the attribute "x" and "y" from the response Event object, however on my mobile the event is undefined.

Marcelo Eduardo Oliveira

If I am not mistaken, on mobile the touch events have "multiple" possibilities ( fingers ) therefore you must access in a diff way.

Can't confirm now but :

e.changedTouches[0].pageX
e.changedTouches[0].pageY

Marcelo Eduardo Oliveira

take a look at something like this: http://mobiforge.com/design-development/html5-mobile-web-touch-events it will help.

Seoh Char

http://framerjs.com/docs/#events.touchEvent

or you can extract 'first' point to mouse event. and handle this as mouse event.

Joel Leví Hernández

Both answers complemented perfectly! Thanks guys :D

Read the entire post on Facebook