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

What is Framer? Join the Community
Return to index
Qixing Zheng
Posted Sep 04 - Read on Facebook

Hi Framer friends,

I'm new to this group. Has anyone build a prototype that has a draggable layer on top of a ScrollComponent (e.g. a draggable button on a scrollable list of content)? I'm trying to do this in my latest prototype and is having trouble to disable the ScrollComponent scrolling when I drag the top layer around. I tried both layer.ignoreEvents and "scroll.scrollVertical = false" when the dragging the top layer, but it didn't work. Any advice would be much appreciated.

7 Comments

Rich Zarick

You can start by setting it's superLayer to a blank value (use two empty quotes). If this is a ux exercise though, I'd suggest you consider the contradictory method of interaction you're designing!

Jordan Robert Dobson

Qixing - the best method to get help here is to provide code so others can dig in to look and help and point out places of error. Either that or a much more detailed description.

Qixing Zheng

Thanks! Rich, I tried to set the superLayer to blank, but the under layer still scrolls. Hope the image below can explain what I'm trying to do better. Sorry I can't share code details. In the example below, the screen content is scrollable vertically and user has the option to move the green "+" button around for ergonomic reasons. What I'm trying to achieve is: when a user want to change the position of the green "+" button on screen, she can drag it around the screen without scrolling the page underneath.

Jordan Robert Dobson

Have you done this?

greenbutton.draggable.enabled = true

Also, is the green button outside of your scroll component?

Qixing Zheng

Yes, the green button drags fine. The problem is when I drag the green button the page underneath also scrolls. The green button is not a child (i.e. sublayer) of the page underneath. However, visually it's moving within the boundary of the page.

Jordan Robert Dobson

That's really odd actually. I wouldn't expect that at all.

Jordan Robert Dobson
Read the entire post on Facebook