diff --git a/packages/web/src/perspectives/PerspectiveTable.svelte b/packages/web/src/perspectives/PerspectiveTable.svelte index 2ec952f7..f115d221 100644 --- a/packages/web/src/perspectives/PerspectiveTable.svelte +++ b/packages/web/src/perspectives/PerspectiveTable.svelte @@ -22,9 +22,6 @@ export let loadedCounts; let dataRows; let domWrapper; - let domTableHead; - let domHeaderWrap; - let theadClone; async function loadLevelData(node: PerspectiveTreeNode, parentRows: any[], counts) { dbg('load level data', counts); @@ -104,38 +101,11 @@ // } } - async function createHeaderClone() { - if (!domTableHead || !domHeaderWrap) return; - await tick(); - - if (theadClone) { - theadClone.remove(); - theadClone = null; - } - theadClone = domTableHead.cloneNode(true); - const sourceCells = domTableHead.querySelectorAll('th'); - const targetCells = theadClone.querySelectorAll('th'); - domHeaderWrap.appendChild(theadClone); - for (const pair of _.zip(sourceCells, targetCells)) { - const [src, dst]: [any, any] = pair; - dst.style.width = `${src.getBoundingClientRect().width - 1}px`; - dst.style.minWidth = `${src.getBoundingClientRect().width - 1}px`; - dst.style.maxWidth = `${src.getBoundingClientRect().width - 1}px`; - } - } - onMount(() => {}); $: loadData(root, $loadedCounts); $: display = root && dataRows ? new PerspectiveDisplay(root, dataRows) : null; - $: { - display; - domTableHead; - domHeaderWrap; - createHeaderClone(); - } - function buildMenu() { return [ { @@ -145,20 +115,15 @@ } -