workspace dragging without scrollbars

60 views
Skip to first unread message

rd

unread,
Feb 6, 2022, 11:32:55 PM2/6/22
to Blockly
hello list

this is a very minor thing, but i'm wondering if it's possible to configure the workspace to be "draggable" without showing the scrollbars?

i've tried the configuration options below, but unless scrollbars are set to true dragging doesn't seem to work 

move: { scrollbars: {horizontal: false, vertical: false}, drag: true, wheel: false }

i see that setting one or the other scrollbar to true restricts the dragging to that axis

so perhaps i'm actually looking for a way to "hide" the scrollbars?

best,
rohan

rd

unread,
Feb 6, 2022, 11:36:32 PM2/6/22
to Blockly
> so perhaps i'm actually looking for a way to "hide" the scrollbars?

and searching for that finds https://github.com/google/blockly/issues/3921 which works

apologies!

best,
rohan

Beka Westberg

unread,
Feb 7, 2022, 11:00:47 AM2/7/22
to blo...@googlegroups.com
Hello rohan!

If I remember correctly, Blockly doesn't natively allow you to have dragging without scrollbars, because it can be easy for the user to lose their program. There's the possibility to drag/scroll very far away, and not know how to get back because there are no scrollbars to indicate which direction to go in.

So I don't think there will ever be a non-hacky way to do this. But I'm glad you found something that works for you!

Best wishes,
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/cdf9c31d-c587-45c8-bfdd-64c917892a96n%40googlegroups.com.

Rohan Drape

unread,
Feb 7, 2022, 10:55:52 PM2/7/22
to blo...@googlegroups.com
Thanks, and yes I can imagine that could be a problem!

It looks like it's possible to edit the opacity and colour and maybe also size of the scrollbars, so making them a little more discreet may be an option too.

Thanks again,
Rohan

rd

unread,
Nov 28, 2022, 11:30:13 PM11/28/22
to Blockly
In case useful for anyone else, the paths to the handles have changed a little bit from the ticket linked above, they're now at:

workspace.scrollbar.vScroll.svgHandle.style.display = 'none';
workspace.scrollbar.hScroll.svgHandle.style.display = 'none';

Thanks as ever for Blockly!

Reply all
Reply to author
Forward
0 new messages