MCPcopy Create free account
hub / github.com/dailydotdev/apps / measure

Function measure

packages/shared/src/components/shell/ReadingDrawer.tsx:113–122  ·  view source on GitHub ↗
(headElement: HTMLElement, probe: HTMLElement)

Source from the content-addressed store, hash-verified

111// Measured in the card layout at the top of the document: the full page
112// stands as far above the card as the band is tall above the status bar.
113const measure = (headElement: HTMLElement, probe: HTMLElement): Geometry => {
114 const edge = headElement.getBoundingClientRect().top + window.scrollY;
115 const full = Math.max(titleLine, titleLine + edge - probe.offsetHeight);
116
117 return {
118 card: titleLine,
119 full,
120 edge,
121 };
122};
123
124const hostOf = (url?: string): string => {
125 if (!url) {

Callers 2

ReadingDrawerFunction · 0.70
onResizeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected