MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / easeScrollToBottom

Function easeScrollToBottom

src/hold-stream.ts:79–85  ·  view source on GitHub ↗
(
  el: HTMLElement,
  factor = DEFAULT_STREAM_SCROLL_EASE,
)

Source from the content-addressed store, hash-verified

77
78/** Ease a scroll container toward its bottom edge */
79export function easeScrollToBottom(
80 el: HTMLElement,
81 factor = DEFAULT_STREAM_SCROLL_EASE,
82): boolean {
83 const target = el.scrollHeight - el.clientHeight;
84 return easeScrollTop(el, target, factor);
85}
86
87/** True when the reader is within thresholdPx of the bottom edge. */
88export function isNearScrollBottom(

Callers 5

streamhtml.tsxFile · 0.90
tickStreamScrollFollowFunction · 0.85
syncNestedStreamScrollFunction · 0.85
settleScrollBottomFunction · 0.85
tickFunction · 0.85

Calls 1

easeScrollTopFunction · 0.85

Tested by

no test coverage detected