MCPcopy Create free account
hub / github.com/Noumena-Network/code / scrollToElement

Function scrollToElement

src/ink/components/ScrollBox.tsx:137–147  ·  view source on GitHub ↗
(el: DOMElement, offset = 0)

Source from the content-addressed store, hash-verified

135 scrollMutated(el);
136 },
137 scrollToElement(el: DOMElement, offset = 0) {
138 const box = domRef.current;
139 if (!box) return;
140 box.stickyScroll = false;
141 box.pendingScrollDelta = undefined;
142 box.scrollAnchor = {
143 el,
144 offset
145 };
146 scrollMutated(box);
147 },
148 scrollBy(dy: number) {
149 const el = domRef.current;
150 if (!el) return;

Callers

nothing calls this directly

Calls 1

scrollMutatedFunction · 0.85

Tested by

no test coverage detected