fix(svelte): use correct updateNodeInternals API

This commit is contained in:
moklick
2024-05-02 15:01:37 +02:00
parent 00cbf2246c
commit 3b940ac5ae
4 changed files with 5 additions and 5 deletions
@@ -104,7 +104,7 @@
{ {
id, id,
nodeElement: nodeRef, nodeElement: nodeRef,
forceUpdate: true force: true
} }
] ]
]) ])
@@ -26,7 +26,7 @@
updates.set(id, { updates.set(id, {
id, id,
nodeElement: entry.target as HTMLDivElement, nodeElement: entry.target as HTMLDivElement,
forceUpdate: true force: true
}); });
}); });
@@ -35,7 +35,7 @@
} from '@xyflow/system'; } from '@xyflow/system';
import { useStore } from '$lib/store'; import { useStore } from '$lib/store';
import type { Node, Edge } from '$lib/types'; import type { Node, Edge, InternalNode } from '$lib/types';
import type { PaneProps } from './types'; import type { PaneProps } from './types';
type $$Props = PaneProps; type $$Props = PaneProps;
@@ -68,7 +68,7 @@
let container: HTMLDivElement; let container: HTMLDivElement;
let containerBounds: DOMRect | null = null; let containerBounds: DOMRect | null = null;
let selectedNodes: Node[] = []; let selectedNodes: InternalNode[] = [];
$: _panOnDrag = $panActivationKeyPressed || panOnDrag; $: _panOnDrag = $panActivationKeyPressed || panOnDrag;
$: isSelecting = $: isSelecting =
@@ -23,7 +23,7 @@ export function useUpdateNodeInternals(): UpdateNodeInternals {
) as HTMLDivElement; ) as HTMLDivElement;
if (nodeElement) { if (nodeElement) {
updates.set(updateId, { id: updateId, nodeElement, forceUpdate: true }); updates.set(updateId, { id: updateId, nodeElement, force: true });
} }
}); });