Scrolling using mouse wheel

177 views
Skip to first unread message

Rick J

unread,
Mar 15, 2018, 4:00:28 PM3/15/18
to Blockly
I am 99% certain that the functionality for scrolling the workspace up and down using the mouse wheel (as opposed to using the scrollbars) is disabled to make the zoom function work but I want to confirm this. I do not have zooming enabled and would like to use the mouse wheel to scroll. Is this possible? I'd like to be able to scroll using the mouse wheel whenever my mouse is hovering over the workspace. 

Erik Pasternak

unread,
Mar 15, 2018, 5:49:58 PM3/15/18
to Blockly
That's half the story. Since Blockly does some custom work to implement the way the workspace grows/shrinks to fit your blocks and how it scrolls just enabling scrolling might not do what you want. You could poke around at the event handling code to see if you can add a scrolling behavior when zoom is disabled.

Rachel Fenichel

unread,
Mar 16, 2018, 2:07:59 PM3/16/18
to Blockly
Scratch Blocks has the behaviour that you want.  Here are the mouse wheel handlers in Blockly and Scratch Blocks.

Cheers,
Rachel
Reply all
Reply to author
Forward
0 new messages