-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Problem
No response
Request
I want to add a margin to the workspaces scrollbar to create some space between it and the edges of the viewport.
After examining the Blockly code, I discovered that the ScrollbarPair and Scrollbar constructors can accept an optional margin parameter. The issue is that this optional margin isn't being passed to the new ScrollbarPair in the core/inject module.
ScrollbarPair class:
constructor(
private workspace: WorkspaceSvg,
addHorizontal?: boolean,
addVertical?: boolean,
opt_class?: string,
opt_margin?: number,
) {
...
}
core/inject
mainWorkspace.scrollbar = new ScrollbarPair(
mainWorkspace,
horizontalScroll,
verticalScroll,
'blocklyMainWorkspaceScrollbar',
// missing margin
);
A quick fix would be to add this property coming from the scrollbar blockly options.
Alternatives considered
Register a new vertical/horizontal Scrollbar using the registry to override the Scrollbar characteristics or behaviours.
Remove the read only keyword from the static property DEFAULT_SCROLLBAR_MARGIN.
Additional context
No response