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

What is Framer? Join the Community
Return to index
Brian Sugden
Posted Nov 11 - Read on Facebook

Is there a way for an object to have different actions for vertical vs horizontal swipes? Example: Swiping down on screen will bring down a panel, swiping left would move user to another section?

9 Comments

Jordan Robert Dobson

Yep. Totally possible. The draggable will report direction to you. Combined with the Touch Move event you could make that work.

Jordan Robert Dobson

That should help you get started. Make the layer as big as you want.

Jordan Robert Dobson

Here is one other example with a layer the entire size of the screen.

http://share.framerjs.com/cet75cwv33r0/

Brian Sugden

Thanks a ton!

Jordan Robert Dobson

I noticed change:y was firing even on only x movement... so Keep that in mind. The nice thing there though is you can listed on only vertical movement if you wanted.

Brian Sugden

Will keep that in mind. One other question - is there a way to do more a swipe action and not actually have the layer move with the drag? The problem I'm running into is that the layer is now dragging and leaving a gap until released then the action after is delayed so theres a weird gap between transitions. A good example of what I am trying to do is here, except I want to start on the battery page, not on top: http://framerjs.com/examples/preview/#glances.framer

Brian Sugden

and within one of those screens I actually want to have another nested layer that can slide up and down

Jordan Robert Dobson

Yep. It's possible. Depends on how you want to do it. Have you looked at using any components?

Read the entire post on Facebook