<BaseEdge />
<BaseEdge />
コンポーネントは、すべてのエッジに対して内部的に使用されます。カスタムエッジ内で使用でき、不可視のヘルパーエッジとエッジラベルを処理します。
CustomEdge.svelte
<script lang="ts">
import { BaseEdge, getStraightPath } from '@xyflow/svelte';
const [edgePath] = getStraightPath({
sourceX,
sourceY,
targetX,
targetY,
});
</script>
<BaseEdge path={edgePath} {...$$props} />
プロパティ
名前 | 型 |
---|---|
# id | string |
# interactionWidth | number |
# path | string |
# style | string |
# class | string |
# markerStart | string |
# markerEnd | string |
# label | string |
# labelX | number |
# labelY | number |
# labelStyle | string |
注記
<BaseEdge />
コンポーネントでエッジマーカーを使用したい場合は、カスタムエッジに渡されたmarkerStart
またはmarkerEnd
プロパティを<BaseEdge />
コンポーネントに渡すことができます。カスタムエッジに渡されるすべてのプロパティは、EdgeProps
型を参照して確認できます。