This commit is contained in:
Ruben Fiszel
2023-03-09 19:56:47 +01:00
parent c9c4b94bc6
commit 3af8549379
3 changed files with 14 additions and 2 deletions
@@ -31,7 +31,7 @@
<InputValue {id} input={configuration.noPadding} bind:value={noPadding} />
<div class="border">
<div>
{#if $app.subgrids?.[`${id}-0`]}
<SubGridEditor
visible={render}
@@ -75,7 +75,7 @@
$: selected && handleTabSelection()
$: outputs = $worldStore?.outputsById[id] as {
selectedTabIndex: Output<number | null>
selectedTabIndex: Output<number>
}
$: selectedIndex = tabs?.indexOf(selected) ?? -1
@@ -80,8 +80,20 @@
component?.componentInput?.type === 'template' && $worldStore
? buildExtraLib($worldStore?.outputsById ?? {}, component?.id, false)
: undefined
function keydown(event: KeyboardEvent) {
switch (event.key) {
case 'Delete': {
removeGridElement()
event.stopPropagation()
break
}
}
}
</script>
<svelte:window on:keydown={keydown} />
{#if component}
<div class="flex flex-col min-w-[150px] w-full divide-y">
{#if component.componentInput}