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

What is Framer? Join the Community
Return to index
Pedro Alejandro Wunderlich
Posted Jan 11 - Read on Facebook

Need help disabling horizontal page scrolling when vertical scrolling on a scroll component occurs. I tried using an if statement to detect when I'm scrolling on the component, but no success...

pageScrollBlock = ->
if scroll.on Events.DragMove
pageView.draggable.horizontal = false

5 Comments

Dave Crow

If you're using a ScrollComponent, then you want scrollHorizontal = false. http://framerjs.com/docs/#scroll.scrollHorizontal

Pedro Alejandro Wunderlich

Thanks, but this isn't what I'm looking for. I have 3 pages arranged horizontally inside a page component. You can swipe left and right between them. Each page has a scroll component. The problem isn't that the scroll components are also scrolling horizontally, it's that the vertical drag also moves the pages component. I'm trying to disable paging when I'm scrolling.

Richard Whitner

Try something like this:

scroller.content.on Events.DragStart, ->
pages.content.draggable.enabled = false

scroller.content.on Events.DragEnd, ->
pages.content.draggable.enabled = true

Ethan Miller

Use the "directionLock" property on the parent PageComponent:
pageComponent.directionLock = true

Michael Boswell

https://www.facebook.com/groups/framerjs/permalink/867613810032358/ I think this is what you're looking for, if you haven't already figured it out.

Read the entire post on Facebook