feat(svelte): add node option 'origin'

This commit is contained in:
moklick
2023-03-14 13:20:52 +01:00
parent 653db49ea4
commit 154be3f900
7 changed files with 20 additions and 17 deletions
@@ -5,7 +5,7 @@
import { NodeWrapper } from '$lib/components/NodeWrapper';
import { useStore } from '$lib/store';
const { nodes, nodeOrigin, updateNodeDimensions } = useStore();
const { nodes, updateNodeDimensions } = useStore();
const resizeObserver: ResizeObserver | null =
typeof ResizeObserver === 'undefined'
@@ -31,7 +31,7 @@
y: node.positionAbsolute?.y ?? 0,
width: node.width ?? 0,
height: node.height ?? 0,
origin: $nodeOrigin
origin: node.origin
})}
<NodeWrapper
id={node.id}