Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →
ReferenceUtils

getSimpleBezierPath()

Source on GitHub 

The getSimpleBezierPath util returns the SVG path string for a simple bezier edge — a smoother curve than the default bezier, without control-point handles — along with the label coordinates.

import { BaseEdge, getSimpleBezierPath } from '@xyflow/vue'; const [path, labelX, labelY] = getSimpleBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, });

Signature

Parameters:
NameTypeDefault
sourceXnumber
sourceYnumber
sourcePositionPosition
targetXnumber
targetYnumber
targetPositionPosition
Returns:
[path: string, labelX: number, labelY: number, offsetX: number, offsetY: number]

A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label