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

What is Framer? Join the Community
Return to index
Katie Wu
Posted Jul 27 - Read on Facebook

This is a really simple question but I can't seem to figure it out: There are 3 pages (A,B,C) in a PageComponent, arranged vertically, I want to limit the scrolling on page B to JUST up. I have something like this right now:

pageComp.on Events.ScrollEnd, ->
------if pageComp.currentPage == B
------------do something here to limit the scroll/swipe on page B


Jonas Treub

The example I made you a few days back about limiting the scroll direction downwards can be used for this as well:

Katie Wu

I originally tried that, but it doesn't work? It still scrolls both ways

pageComp.on Events.ScrollEnd, ->
-----if pageComp.currentPage == two
----------pageComp.content.draggable.updatePosition = (point) ->
---------------if Math.abs(point.y) < pageComp.content.height - pageComp.height
--------------------point.y = Math.min(point.y, -pageComp.scrollY)
---------------return point

Jonas Treub

You are right. Not that easy. Maybe easier to create a simple draggable and add your custom behavior.

Katie Wu

I would but I'd need to change the entire grid-like structure you helped me with before, and it mostly works fine so that seems like a step back in progress. Maybe limiting scroll/swipe directions for Scroll/PageComponents could be a feature for next release? Like you can set scrollUp = true, or scrollDown, scrollRight, scrollLeft etc. It seems like it'd be useful to define! Thanks anyway though! :)

Read the entire post on Facebook