diff --git a/packages/frontend-core/src/components/sheet/ScrollOverlay.svelte b/packages/frontend-core/src/components/sheet/ScrollOverlay.svelte
index bdc127c8c3..86e0c3bd55 100644
--- a/packages/frontend-core/src/components/sheet/ScrollOverlay.svelte
+++ b/packages/frontend-core/src/components/sheet/ScrollOverlay.svelte
@@ -19,11 +19,17 @@
$: width = $bounds.width
// Calculate V scrollbar size and offset
+ // Terminology is the same for both axes:
+ // contentX - the size of the rendered content
+ // renderX - the space available to render the bar in, edge to edge
+ // barX - the length of the bar
+ // availX - the space available to render the bar in, until the edge
+ // barX - the offset of the bar
$: contentHeight = ($rows.length + 1) * cellHeight
$: renderHeight = height - 2 * barOffset
$: barHeight = Math.max(50, (height / contentHeight) * renderHeight)
$: availHeight = renderHeight - barHeight
- $: maxScrollTop = Math.max(contentHeight - height, 0)
+ $: maxScrollTop = Math.max(contentHeight - height + 180, 0)
$: barTop = barOffset + cellHeight + availHeight * (scrollTop / maxScrollTop)
// Calculate H scrollbar size and offset
@@ -32,7 +38,7 @@
$: renderWidth = totalWidth - 2 * barOffset
$: barWidth = Math.max(50, (totalWidth / contentWidth) * renderWidth)
$: availWidth = renderWidth - barWidth
- $: maxScrollLeft = Math.max(contentWidth - totalWidth, 0)
+ $: maxScrollLeft = Math.max(contentWidth - totalWidth + 180, 0)
$: barLeft = barOffset + availWidth * (scrollLeft / maxScrollLeft)
// Calculate whether to show scrollbars or not
@@ -43,18 +49,22 @@
// rows or tables
$: {
if (scrollTop > maxScrollTop) {
- scroll.update(state => ({
- ...state,
- top: maxScrollTop,
- }))
+ setTimeout(() => {
+ scroll.update(state => ({
+ ...state,
+ top: maxScrollTop,
+ }))
+ })
}
}
$: {
if (scrollLeft > maxScrollLeft) {
- scroll.update(state => ({
- ...state,
- left: maxScrollLeft,
- }))
+ setTimeout(() => {
+ scroll.update(state => ({
+ ...state,
+ left: maxScrollLeft,
+ }))
+ })
}
}
diff --git a/packages/frontend-core/src/components/sheet/Sheet.svelte b/packages/frontend-core/src/components/sheet/Sheet.svelte
index 91f1c3f681..2c337dc22c 100644
--- a/packages/frontend-core/src/components/sheet/Sheet.svelte
+++ b/packages/frontend-core/src/components/sheet/Sheet.svelte
@@ -116,7 +116,7 @@
display: flex;
flex-direction: row;
justify-items: flex-start;
- align-items: flex-start;
+ align-items: stretch;
overflow: hidden;
height: 0;
position: relative;
@@ -126,6 +126,5 @@
overflow: hidden;
display: flex;
flex-direction: column;
- align-self: stretch;
}
diff --git a/packages/frontend-core/src/components/sheet/SheetRow.svelte b/packages/frontend-core/src/components/sheet/SheetRow.svelte
index a665addbea..eee6f2cb1b 100644
--- a/packages/frontend-core/src/components/sheet/SheetRow.svelte
+++ b/packages/frontend-core/src/components/sheet/SheetRow.svelte
@@ -1,9 +1,7 @@
-