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

38 lines
1.3 KiB
JavaScript

define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasHorizontalOverflow = hasHorizontalOverflow;
exports.hasVerticalOverflow = hasVerticalOverflow;
exports.hasOverflow = hasOverflow;
/**
* Detects whether an element's content has horizontal overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
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
*/
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
*/
function hasOverflow(element) {
return hasHorizontalOverflow(element) || hasVerticalOverflow(element);
}
});
//# sourceMappingURL=overflow.js.map