Skip to main content

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

ParameterTypeDefault valueDescription
elHTMLElementundefinedThe element to scroll into view in the container.
containerHTMLElementundefinedThe container to scroll.
pinDirection"top" | "none" | "bottom"'none'The end of the container which the element should be pinned to.

Returns

void