refactor(svelte): cleanup store usage

This commit is contained in:
moklick
2023-02-28 12:43:29 +01:00
parent 7a879f3c54
commit 62a6278682
25 changed files with 420 additions and 397 deletions
@@ -2,13 +2,13 @@
import { useStore } from '$lib/store';
import Selection from '$lib/components/Selection/index.svelte';
const { selectionRectStore, selectionRectModeStore } = useStore();
const { selectionRect, selectionRectMode } = useStore();
</script>
<Selection
isVisible={!!($selectionRectStore && $selectionRectModeStore === 'user')}
width={$selectionRectStore?.width}
height={$selectionRectStore?.height}
x={$selectionRectStore?.x}
y={$selectionRectStore?.y}
isVisible={!!($selectionRect && $selectionRectMode === 'user')}
width={$selectionRect?.width}
height={$selectionRect?.height}
x={$selectionRect?.x}
y={$selectionRect?.y}
/>