refactor(svelte): cleanup nodes selection
This commit is contained in:
@@ -17,14 +17,9 @@
|
||||
class="selection-wrapper nopan"
|
||||
style="width: {rect.width}px; height: {rect.height}px; transform: translate({rect.x}px, {rect.y}px)"
|
||||
use:drag={{ disabled: false, store }}
|
||||
/>
|
||||
<Selection
|
||||
isVisible={$selectionRectMode === 'nodes'}
|
||||
width={rect.width}
|
||||
height={rect.height}
|
||||
x={rect.x}
|
||||
y={rect.y}
|
||||
/>
|
||||
>
|
||||
<Selection width="100%" height="100%" x={0} y={0} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
@@ -7,3 +7,11 @@
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.svelte-flow__nodes {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.svelte-flow__edgelabel-renderer {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user