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

What is Framer? Join the Community
Return to index
Steve Ruiz
Posted Feb 05 - Read on Facebook

Hey, question here. I want to (a) begin a touch event on one layer, (b) drag the touch event through a second layer, and (b) end it on a third layer. Is there any way to capture the event at (b), or notice that a touch event's coordinates are occurring on top of a layer, despite neither starting or ending on that layer?

5 Comments

Radek Kyselý

How hard coded can it be?

Steve Ruiz

I can think of some custom solutions, listening for a change in the touch point and comparing it against the second layer's frame; however, if there already exists the equivalent to 'onMouseOver' for touches, I'd use that instead. I just can't find it :/

Radek Kyselý

Steve Ruiz Yea, MouseOver doesn't work on touch devices, too bad.
You can however nest ›TouchMove‹ listener inside you ›Drag‹ event.
Just make sure the draggable layer is ›placed behind‹ target layers :)

Radek Kyselý
Steve Ruiz

Hm, I think these solutions involve dragged layers, rather than just touches that cross over other layers. I did manage to make a workaround, listening to the touch coordinates as I mentioned above. This won't work on desktop, but will work if you mirror it to a touch device. https://framer.cloud/cJINB/

Read the entire post on Facebook