Skip to main content

Class: ScrollUtils

Scroll utils

Constructors

constructor

new ScrollUtils(): ScrollUtils

Returns

ScrollUtils

Methods

ensureInView

ensureInView(el, container, pinDirection?): void

Scrolls the container to make sure an element is in view.

Parameters

NameTypeDefault 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

Defined in

src/sdk/graphics/layout/ScrollUtils.ts:9