fix(ui): remove stale card heights

main
AlexsandrSnytkin 16 hours ago
parent 9c26148f7a
commit 332fe1c125

@ -2034,10 +2034,15 @@ HTML = """<!doctype html>
} }
function fitConfigBlockContent(block) { function fitConfigBlockContent(block) {
if (!block || configBlockState(block) || block._configManualHeight) return false; if (!block || configBlockState(block) || block._configManualHeight) return false;
const entry = configLayout[block.dataset.section];
if (block.style.height && block.style.height !== 'auto') {
block.style.height = 'auto';
if (entry) { delete entry.height; delete entry.manualHeight; }
return true;
}
const contentHeight = block.scrollHeight; const contentHeight = block.scrollHeight;
if (!contentHeight || block.offsetHeight <= contentHeight + 120) return false; if (!contentHeight || block.offsetHeight <= contentHeight + 120) return false;
block.style.height = 'auto'; block.style.height = 'auto';
const entry = configLayout[block.dataset.section];
if (entry && Object.prototype.hasOwnProperty.call(entry, 'height')) { if (entry && Object.prototype.hasOwnProperty.call(entry, 'height')) {
delete entry.height; delete entry.height;
delete entry.manualHeight; delete entry.manualHeight;

Loading…
Cancel
Save