chore(svelte/selection): cleanup

This commit is contained in:
moklick
2025-10-28 15:46:50 +01:00
parent 3c609e0122
commit 072308f80e
2 changed files with 3 additions and 6 deletions

View File

@@ -85,7 +85,7 @@
onkeydown={store.disableKeyboardA11y ? undefined : onkeydown}
bind:this={ref}
>
<Selection width="100%" height="100%" x={0} y={0} class="svelte-flow__nodesselection-rect" />
<Selection width="100%" height="100%" x={0} y={0} />
</div>
{/if}

View File

@@ -1,5 +1,4 @@
<script lang="ts">
import type { ClassValue } from 'svelte/elements';
import { toPxString } from '$lib/utils';
let {
@@ -7,21 +6,19 @@
y = 0,
width = 0,
height = 0,
isVisible = true,
...props
isVisible = true
}: {
x?: number;
y?: number;
width?: number | string;
height?: number | string;
isVisible?: boolean;
class?: ClassValue;
} = $props();
</script>
{#if isVisible}
<div
class={['svelte-flow__selection', props.class]}
class="svelte-flow__selection"
style:width={typeof width === 'string' ? width : toPxString(width)}
style:height={typeof height === 'string' ? height : toPxString(height)}
style:transform={`translate(${x}px, ${y}px)`}