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

What is Framer? Join the Community
Return to index
Eyal Zaidman
Posted Feb 12 - Read on Facebook

Quick "click" event questions:
1. How do I get the x,y position of the click (event.x works on the emulator but returns "undefined" on the device)?
2. Where can I find the documentation for this (couldn't find it on Framer's website)?
3. It is possible that there's an offset of the click position (on the emulator, when I click on the top-left corner I get x,y = 99,143)?

3 Comments

Eyal Zaidman

Seems like event.pageX is the only one that's working on the device itself (x, screenX, clientX and offsetX don't work). I wonder where is the information on this...

Radek Kyselý

When you use ›Tap‹ event, you can read event.touchCenter that is an object with x and y keys and works on both desktop and devices :)

Jordan Robert Dobson

I wrote a normalizer for this.

Read the entire post on Facebook