blockly > ScrollbarPair
Class for a pair of scrollbars. Horizontal and vertical.
Signature:
export declare class ScrollbarPair
Constructors
Properties
Methods
Method |
Modifiers |
Description |
canScrollHorizontally() |
|
Returns whether scrolling horizontally is enabled. |
canScrollVertically() |
|
Returns whether scrolling vertically is enabled. |
dispose() |
|
Dispose of this pair of scrollbars. Unlink from all DOM elements to prevent memory leaks. |
isVisible() |
|
If any of the scrollbars are visible. Non-paired scrollbars may disappear when they aren't needed. |
resize() |
|
Recalculate both of the scrollbars' locations and lengths. Also reposition the corner rectangle. |
resizeContent(hostMetrics) |
|
Recalculates the scrollbars' locations within their path and length. This should be called when the contents of the workspace have changed. |
resizeView(hostMetrics) |
|
Recalculates the scrollbars' locations on the screen and path length. This should be called when the layout or size of the window has changed. |
set(x, y, updateMetrics) |
|
Set the handles of both scrollbars. |
setContainerVisible(visible) |
|
Set whether this scrollbar's container is visible. |
setVisible(visible) |
|
Sets the visibility of any existing scrollbars. |
setX(x) |
|
Set the handle of the horizontal scrollbar to be at a certain position in CSS pixels relative to its parents. |
setY(y) |
|
Set the handle of the vertical scrollbar to be at a certain position in CSS pixels relative to its parents. |