Normalize Click & Touch Event Coordinates
I put together this Pointer Class module to help myself in my own project as well as address some questions I've seen regarding this in the community lately.
My brother Josh was having trouble getting one of Jay Stakelon's exercises working in both Framer Studio and on the device.
It's working now. :) http://share.framerjs.com/q3a04hzyaqb8/
I was dealing with a similar problem and recently noticed Brandon Souba was too. So, I decided to wrap the code up into a module for all to share. :)
Once you add the module to your project, you can use the Pointer class to get either the Screen or Offset x & y coordinates.
Here's two quick usage examples:
1. btn.on Events.Click, (event, layer) -> print Pointer.screen(event, layer)
2. btn.on Events.Click, (event, layer) -> print Pointer.offset(event, layer)
Instructions for adding it to your project are in the comments at the top of the module file. You can also check out this link to read the comments and download the file: http://jrdn.io/cEnw
This should take away a lot of the frustration and WTF moments when dealing with cross platform scenarios involving pointer location.
I hope this helps...
<3 Jordan #framerCode