Only show empty rows in grid layouts when in the builder
This commit is contained in:
parent
22f971cd3d
commit
0875d0c5e1
|
@ -17,7 +17,12 @@
|
|||
let mounted = false
|
||||
let styles = memo({})
|
||||
|
||||
$: requiredRows = calculateRequiredRows($children, mobile, addEmptyRows)
|
||||
$: inBuilder = $builderStore.inBuilder
|
||||
$: requiredRows = calculateRequiredRows(
|
||||
$children,
|
||||
mobile,
|
||||
addEmptyRows && inBuilder
|
||||
)
|
||||
$: requiredHeight = requiredRows * GridRowHeight
|
||||
$: availableRows = Math.floor(height / GridRowHeight)
|
||||
$: rows = Math.max(requiredRows, availableRows)
|
||||
|
@ -133,7 +138,7 @@
|
|||
data-cols={GridColumns}
|
||||
data-col-size={colSize}
|
||||
>
|
||||
{#if $builderStore.inBuilder}
|
||||
{#if inBuilder}
|
||||
<div class="underlay">
|
||||
{#each { length: GridColumns * rows } as _, idx}
|
||||
<div class="placeholder" class:first-col={idx % GridColumns === 0} />
|
||||
|
|
Loading…
Reference in New Issue