跳到主要内容

ui/build/doc-toc/anchor-observer

ui/build/doc-toc/anchor-observer

Classes

DocTocAnchorObserver

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:6

Constructors

Constructor
new DocTocAnchorObserver(): DocTocAnchorObserver;
Returns

DocTocAnchorObserver

Properties

items
items: DocTocItemInfo[];

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:7

Methods

listen()
listen(listener): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:14

Parameters
Parameter Type
listener DocTocChangeListener
Returns

void

setItems()
setItems(newItems): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:16

Parameters
Parameter Type
newItems DocTocItem[]
Returns

void

unlisten()
unlisten(listener): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:15

Parameters
Parameter Type
listener DocTocChangeListener
Returns

void

unwatch()
unwatch(): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:18

Returns

void

watch()
watch(options?): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:17

Parameters
Parameter Type
options? IntersectionObserverInit
Returns

void

Functions

buildDocTocRootMargin()

function buildDocTocRootMargin(topRem?, bottomPercent?): string;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:4

IntersectionObserver rootMargin only accepts px or % — not rem.

Parameters

Parameter Type
topRem? number
bottomPercent? number

Returns

string


computeDocTocTrackBounds()

function computeDocTocTrackBounds(positions, items): any;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:35

Parameters

Parameter Type
positions ([number, number] | null)[]
items DocTocItemInfo[]

Returns

any


findLastActiveIndex()

function findLastActiveIndex(items): number;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:5

Parameters

Parameter Type
items DocTocItemInfo[]

Returns

number


getActiveDocTocItem()

function getActiveDocTocItem(items): any;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:34

Parameters

Parameter Type
items DocTocItemInfo[]

Returns

any


scrollDocTocLinkIntoView()

function scrollDocTocLinkIntoView(link, container): void;

Defined in: apps/website/.api-docs-entry/ui/build/doc-toc/anchor-observer.d.ts:36

Parameters

Parameter Type
link HTMLElement
container HTMLElement

Returns

void