refactor(svelte): cleanup components

This commit is contained in:
moklick
2023-03-01 11:48:08 +01:00
parent 00515e1f9b
commit 9391b36869
61 changed files with 600 additions and 196 deletions
@@ -0,0 +1,23 @@
<script lang="ts">
import { useStore } from '$lib/store';
import zoom from '$lib/actions/zoom';
const { transform, d3, selectionKeyPressed, selectionRectMode } = useStore();
$: selecting = $selectionKeyPressed || $selectionRectMode === 'user';
</script>
<div class="react-flow__zoom" use:zoom={{ transform, d3, selecting }}>
<slot />
</div>
<style>
.react-flow__zoom {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
</style>