chore(svelte): update examples

This commit is contained in:
moklick
2025-01-09 17:22:29 +01:00
parent aac614e719
commit a13b6bf4ea
2 changed files with 4 additions and 5 deletions

View File

@@ -1,8 +1,7 @@
<script lang="ts">
import {
SvelteFlow,
useConnection,
useHandleConnections,
useNodeConnections,
useSvelteFlow,
type Edge,
type Node,
@@ -30,7 +29,7 @@
const { screenToFlowPosition, flowToScreenPosition } = $derived(useSvelteFlow());
const connections = useHandleConnections({ nodeId: '0', type: 'source' });
const connections = useNodeConnections({ id: '0', handleType: 'source' });
$inspect(connections.current);

View File

@@ -4,7 +4,7 @@
Position,
type NodeProps,
type Connection,
useHandleConnections
useNodeConnections
} from '@xyflow/svelte';
let { id }: NodeProps = $props();
@@ -25,7 +25,7 @@
console.log('disconnect source', handleId, connection);
}
const connections = useHandleConnections({ nodeId: id, type: 'target' });
const connections = useNodeConnections({ id: id, handleType: 'target' });
$inspect(connections.current);
</script>