Blockly. ScrollbarPair
Constructor
ScrollbarPair
new ScrollbarPair(workspace)
Class for a pair of scrollbars. Horizontal and vertical.
Parameter |
|
---|---|
workspace |
Workspace to bind the scrollbars to. Value must not be null. |
Methods
dispose
dispose()
Dispose of this pair of scrollbars. Unlink from all DOM elements to prevent memory leaks.
resize
resize()
Recalculate both of the scrollbars' locations and lengths. Also reposition the corner rectangle.
set
set(x, y)
Set the handles of both scrollbars to be at a certain position in CSS pixels relative to their parents.
Parameter |
|
---|---|
x |
number Horizontal scroll value. |
y |
number Vertical scroll value. |
setContainerVisible
setContainerVisible(visible)
Set whether this scrollbar's container is visible.
Parameter |
|
---|---|
visible |
boolean Whether the container is visible. |