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

What is Framer? Join the Community
Return to index
Nick Kutateli
Posted Apr 21 - Read on Facebook

Is there a way to fire the `onTouchEnd` event only if `onTouchStart` happened on the same object? I expect `onTap` to function this way but it doesn’t seem that it does.


Debashish Paul

Hey Nick, not sure if I understand ur question correctly, but I am assuming that u have two layers say A and B and u touchStart on A and swipe to B and release, you are getting the touchEnd on B even tough you did not touch start on B..? if so u can solve this with some conditionals. Adding an example file -

Trevor Phillippi

Hey – Deb might have helped you sufficently but I just whipped up an example with two adjacent squares managing which one was first touched

Trevor Phillippi

Basically, in this approach (which may or not be ideal) you manage which layer was started on, and then guard against it in your finishing handler

Jordan Robert Dobson

Yep. Just set a flag on the layer.

Jordan Robert Dobson

Here's another method you could use too

Read the entire post on Facebook