getOutgoers()
このユーティリティは、エッジのターゲットとして、どのノードが指定されたノードに接続されているかを判別するために使用されます。
import { getOutgoers } from '@xyflow/svelte';
const nodes = [];
const edges = [];
const incomers = getOutgoers(
{ id: '1', position: { x: 0, y: 0 }, data: { label: 'node' } },
nodes,
edges,
);
シグネチャ
名前 | 型 |
---|---|
#パラメータ |
|
# node | Node |
# nodes | Node[] |
# edges | Edge[] |
#戻り値 |
|
Node[] |