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

What is Framer? Join the Community
Return to index
Igor Kulemza
Posted Aug 11 - Read on Facebook

How to enable scroll by mouse wheel? I set true for scroll.mouseWheelEnabled but it still works only with click'n'drag as usual. I prototype for desctop. Help please )


Stephen Crowley

Hey Igor, let me see if I can help. Wiithout seeing what's going on in your project, can I assume that your scroll component is in fact named "scroll" and scroll.mouseWheelEnabled = true is set after you have defined new ScrollComponenet ?

Igor Kulemza

I guess i already find whats wrong. :)
It was work but something was wrong with my scroll content. Trying to find out what exactly :)

Stephen Crowley

Hey, at least its fixed! Let me know what you find out, I'm curious. :)

Karolis Krulis

When I do this, my prototype scrolls in every direction now - I just want it scrolling vertical only. Any way to limit the behavior?

Alan Dickinson

Karolis Krulis you can disable horizontal scrolling on the scroll component by setting its scrollHorizontal property to false.

scroll = new ScrollComponent
layerA = new Layer
parent: scroll.content

scroll.scrollHorizontal = false

Karolis Krulis

Alan Dickinson I forgot to specify: I want to scroll using the mouse wheel or trackpad scrolling ( scroll.mouseWheel = True )
But then scrollHorizontal does nothing...
Any thoughts?

Alan Dickinson

Karolis Krulis I'm not 100% sure, but you could try messing with the "overflow-x" css property on the scroll component. Setting that to hidden might work?

Artūrs Vanags

Karolis Krulis scroll.mouseWheelEnabled = true

Read the entire post on Facebook