fix(svelte): use correct updateNodeInternals API
This commit is contained in:
@@ -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 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user