|
|
|
@ -547,24 +547,20 @@ function getNaturalHeight(el) { |
|
|
|
// Save original inline styles
|
|
|
|
|
|
|
|
const prevParent = { |
|
|
|
display: el.style.display, |
|
|
|
visibility: el.style.visibility |
|
|
|
display: el.style.display |
|
|
|
}; |
|
|
|
|
|
|
|
// Apply temporary styles to parent
|
|
|
|
el.style.display = "flex"; |
|
|
|
|
|
|
|
// Also handle hidden children
|
|
|
|
// Handle hidden children
|
|
|
|
const childPrev = []; |
|
|
|
for (let child of el.children) { |
|
|
|
childPrev.push({ |
|
|
|
display: child.style.display, |
|
|
|
visibility: child.style.visibility, |
|
|
|
position: child.style.position |
|
|
|
display: child.style.display |
|
|
|
}); |
|
|
|
|
|
|
|
child.style.display = "block"; // let CSS decide
|
|
|
|
|
|
|
|
child.style.display = "block"; |
|
|
|
} |
|
|
|
|
|
|
|
// Measure
|
|
|
|
|