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

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

Is there a touch or pan event that is similar to onMouseOff?

Basically, I have a container with default draggable disabled, then when the touch starts inside, and moves outside the container, I want the container to follow the touch point.

8 Comments

Trevor Phillippi

What's the use case such that Events.PanEnd or Events.TouchEnd wont work?

Noah Tsutsui

Trevor It seems to me gestures and mouse hovers work very differently. For example, if the finger moves off the container with the event, the onPanEnd won't actually fire until the user lifts their finger, while mouseOff works while the mouseDown is still firing.

Noah Tsutsui

Ok... how do I get a gif in a comment to animate? The thing gets converted to jpg

Trevor Phillippi

Ah, yes, sorry, MouseOff is when you are no longer hovering. Can you share the file and I'll fiddle for a sec?

Noah Tsutsui
Trevor Phillippi

so is the desired behavior when the touch leaves the bounds of the container, the container tracks with the pan?

Noah Tsutsui

FWIW, this attempt using mouse events kinda works

Trevor Phillippi

this small tweak should start you in the right direction, no? Is this link capturing your desired behavior? (you'll def need to do more work to get it snapping and able to pull back down and stuff still)http://share.framerjs.com/dofpvs5k8r3m/ (open project in framer btw, browser botches the event)

Read the entire post on Facebook