Class: ScrollUtils
Scroll utils
Constructors
constructor
• new ScrollUtils(): ScrollUtils
Returns
Methods
ensureInView
▸ ensureInView(el
, container
, pinDirection?
): void
Scrolls the container to make sure an element is in view.
Parameters
Name | 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
Defined in
src/sdk/graphics/layout/ScrollUtils.ts:9