experimental rework of metricplot render and resize handling

This commit is contained in:
Christoph Kluge
2024-10-08 15:25:31 +02:00
parent 182f0f2c64
commit 89ec749172
2 changed files with 39 additions and 63 deletions

View File

@@ -18,7 +18,6 @@
export let renderFor
let rows = []
let colWidth;
const isPlaceholder = x => x._is_placeholder === true
function tile(items, itemsPerRow) {
@@ -48,11 +47,9 @@
<Row cols={{ xs: 1, sm: 1, md: 2, lg: itemsPerRow}}>
{#each row as item (item)}
<Col class="px-1">
<div bind:clientWidth={colWidth}>
{#if !isPlaceholder(item)}
<slot item={item} width={colWidth}/>
{/if}
</div>
{#if !isPlaceholder(item)}
<slot item={item}/>
{/if}
</Col>
{/each}
</Row>