<BaseEdge />

GitHubでソースを表示

<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型を参照して確認できます。