app/assets/js/helpers/dom.js in coveragebook_components-0.14.0 vs app/assets/js/helpers/dom.js in coveragebook_components-0.15.0

- old
+ new

@@ -1,20 +1,7 @@ import { isNumeric } from "@helpers/lang"; -function getHiddenElementDimensions(el, display = "block") { - let size; - if (el.style.display === "none") { - el.style.display = display; - size = el.getBoundingClientRect(); - el.style.display = "none"; - } else { - size = el.getBoundingClientRect(); - } - - return size; -} - function castAttributeValue(value) { if (value === "false") { return false; } @@ -36,6 +23,6 @@ typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string"; } -export { getHiddenElementDimensions, castAttributeValue, isNode }; +export { castAttributeValue, isNode };