Fix reorder overlay height

This commit is contained in:
Andrew Kingston 2023-04-18 08:23:14 +01:00
parent 420e0bb279
commit fef44737f8
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<script> <script>
import { getContext } from "svelte" import { getContext } from "svelte"
import SheetScrollWrapper from "../layout/SheetScrollWrapper.svelte" import SheetScrollWrapper from "../layout/SheetScrollWrapper.svelte"
import { GutterWidth } from "../lib/constants" import { DefaultRowHeight, GutterWidth } from "../lib/constants"
const { const {
isReordering, isReordering,
@ -16,7 +16,7 @@
$: targetColumn = $reorder.targetColumn $: targetColumn = $reorder.targetColumn
$: minLeft = GutterWidth + ($stickyColumn?.width || 0) $: minLeft = GutterWidth + ($stickyColumn?.width || 0)
$: left = getLeft(targetColumn, $stickyColumn, $visibleColumns, $scrollLeft) $: left = getLeft(targetColumn, $stickyColumn, $visibleColumns, $scrollLeft)
$: height = $rowHeight * ($renderedRows.length + 1) $: height = $rowHeight * $renderedRows.length + DefaultRowHeight
$: style = `left:${left}px; height:${height}px;` $: style = `left:${left}px; height:${height}px;`
$: visible = $isReordering && left >= minLeft $: visible = $isReordering && left >= minLeft