fix(frontend): fix horizontal splitpanes (#1301)

This commit is contained in:
Faton Ramadani
2023-03-17 15:46:45 +01:00
committed by GitHub
parent 04431e8599
commit c0669c34a0
2 changed files with 5 additions and 6 deletions
@@ -79,9 +79,7 @@
class={css?.container.class}
style={css?.container.style}
bind:subGrid={$app.subgrids[`${id}-${index}`]}
containerHeight={horizontal
? (componentContainerHeight * paneSize) / 100 - 1
: componentContainerHeight - 8}
containerHeight={horizontal ? undefined : componentContainerHeight - 8}
on:focus={() => {
$selectedComponent = id
$focusedGrid = {
@@ -10,7 +10,7 @@
import Grid from '../svelte-grid/Grid.svelte'
import GridViewer from './GridViewer.svelte'
export let containerHeight: number
export let containerHeight: number | undefined = undefined
export let containerWidth: number | undefined = undefined
let classes = ''
export { classes as class }
@@ -79,12 +79,13 @@
'overflow-auto',
noYPadding ? '' : 'py-2',
classes ?? '',
noPadding ? 'px-0' : 'px-2'
noPadding ? 'px-0' : 'px-2',
containerHeight ? `h-[${containerHeight}px}]` : 'h-full'
)}
on:pointerdown|stopPropagation={onpointerdown}
on:pointerleave={onpointerup}
on:pointerup={onpointerup}
style="height: {containerHeight}px; {style ?? ''}"
style={style ?? ''}
>
{#if $mode !== 'preview'}
<div class={highlight ? 'border-gray-400 border border-dashed min-h-full' : ''}>