chore(svelte): update examples
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
SvelteFlow,
|
SvelteFlow,
|
||||||
useConnection,
|
useNodeConnections,
|
||||||
useHandleConnections,
|
|
||||||
useSvelteFlow,
|
useSvelteFlow,
|
||||||
type Edge,
|
type Edge,
|
||||||
type Node,
|
type Node,
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
|
|
||||||
const { screenToFlowPosition, flowToScreenPosition } = $derived(useSvelteFlow());
|
const { screenToFlowPosition, flowToScreenPosition } = $derived(useSvelteFlow());
|
||||||
|
|
||||||
const connections = useHandleConnections({ nodeId: '0', type: 'source' });
|
const connections = useNodeConnections({ id: '0', handleType: 'source' });
|
||||||
|
|
||||||
$inspect(connections.current);
|
$inspect(connections.current);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Position,
|
Position,
|
||||||
type NodeProps,
|
type NodeProps,
|
||||||
type Connection,
|
type Connection,
|
||||||
useHandleConnections
|
useNodeConnections
|
||||||
} from '@xyflow/svelte';
|
} from '@xyflow/svelte';
|
||||||
|
|
||||||
let { id }: NodeProps = $props();
|
let { id }: NodeProps = $props();
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
console.log('disconnect source', handleId, connection);
|
console.log('disconnect source', handleId, connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
const connections = useHandleConnections({ nodeId: id, type: 'target' });
|
const connections = useNodeConnections({ id: id, handleType: 'target' });
|
||||||
|
|
||||||
$inspect(connections.current);
|
$inspect(connections.current);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user