UNPKG

@grafana/ui

Version:
12 lines (10 loc) 354 B
const isElementOverflowing = (element) => { if (!element) { return false; } const wrapperPos = element.parentElement.getBoundingClientRect(); const pos = element.getBoundingClientRect(); return pos.width !== 0 && wrapperPos.right + pos.width + 10 > window.innerWidth; }; export { isElementOverflowing }; //# sourceMappingURL=utils.mjs.map