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

What is Framer? Join the Community
Return to index
Ee Venn Soh
Posted Apr 05 - Read on Facebook

Having a little bit of trouble trying to insert a scrollComponent within a pageComponent.

page.content.on(Events.DragStart, function(event){
scroll.content.draggable.enabled = false;

Boolean value is still "True". Hence the scroll content is moved as you interact with the pageComponent which is not great.

Any fix?


Ben Rodenhäuser

It sounds like you need the directionLock property. If you set directionLock to "true" on both your scrollComponent and pageComponent, horizontal movement should block vertical movement, and vice versa. There's also a threshold you can define when this will kick in.

Ee Venn Soh

Playing with the velocityThreshold and overdragScale fix this. However a quicker and more elegant approach is to have scrollHorizontal: false in the scrollComponent. Although scrollHorizontal seems to be disable when you place it within a pageComponent.

Ben Rodenhäuser

Yeah, sorry I forgot to mention scrollHorizontal (or scrollVertical, for that matter) earlier. Best thing is, I think, to use it in tandem with directionLock.

Read the entire post on Facebook