Class: ScrollUtils
Defined in: src/sdk/graphics/layout/ScrollUtils.ts:2
Scroll utils
Constructors
Constructor
new ScrollUtils():
ScrollUtils
Returns
ScrollUtils
Methods
ensureInView()
static
ensureInView(el
,container
,pinDirection
):void
Defined in: src/sdk/graphics/layout/ScrollUtils.ts:9
Scrolls the container to make sure an element is in view.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
el | HTMLElement | undefined | The element to scroll into view in the container. |
container | HTMLElement | undefined | The container to scroll. |
pinDirection | "top" | "none" | "bottom" | 'none' | The end of the container which the element should be pinned to. |
Returns
void