chore(svelte): update examples
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user