refactor(svelte): cleanup nodes selection
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<script lang="ts">
|
||||
export let x: number | null = 0;
|
||||
export let y: number | null = 0;
|
||||
export let width: number | null = 0;
|
||||
export let height: number | null = 0;
|
||||
export let width: number | string | null = 0;
|
||||
export let height: number | string | null = 0;
|
||||
export let isVisible: boolean = true;
|
||||
</script>
|
||||
|
||||
{#if isVisible}
|
||||
<div
|
||||
class="svelte-flow__selection"
|
||||
style="width: {width}px; height: {height}px; transform: translate({x}px, {y}px)"
|
||||
style:width={typeof width === 'string' ? width : `${width}px`}
|
||||
style:height={typeof height === 'string' ? height : `${height}px`}
|
||||
style:transform={`translate(${x}px, ${y}px)`}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user