Files
starface-outlook-sync-addin/node_modules/@fluentui/utilities/lib/overflow.js
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

31 lines
918 B
JavaScript

/**
* Detects whether an element's content has horizontal overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasHorizontalOverflow(element) {
return element.clientWidth < element.scrollWidth;
}
/**
* Detects whether an element's content has vertical overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasVerticalOverflow(element) {
return element.clientHeight < element.scrollHeight;
}
/**
* Detects whether an element's content has overflow in any direction
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasOverflow(element) {
return hasHorizontalOverflow(element) || hasVerticalOverflow(element);
}
//# sourceMappingURL=overflow.js.map