MCPcopy Index your code
hub / github.com/simstudioai/sim / isTextClipped

Function isTextClipped

packages/emcn/src/components/tooltip/tooltip.tsx:190–192  ·  view source on GitHub ↗
(element: HTMLElement)

Source from the content-addressed store, hash-verified

188
189/** Whether an element's content is wider than its visible box. */
190export function isTextClipped(element: HTMLElement): boolean {
191 return element.scrollWidth > element.clientWidth + 1
192}
193
194/** Clamps `value` to the inclusive `[min, max]` range. */
195export function clamp(value: number, min: number, max: number): number {

Callers 2

useIsOverflowingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected