UNPKG

@vue-flow/core

Version:

[![Vue flow](vue-flow.gif)](https://vueflow.dev/) ![top-language](https://img.shields.io/github/languages/top/bcakmakoglu/vue-flow) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bcakmakoglu/vue-flow) ![GitHub last commit](

26 lines (24 loc) 1.19 kB
import type { Position } from '../../../types' import type { EdgePathParams } from './general' export interface GetSimpleBezierPathParams { sourceX: number sourceY: number sourcePosition?: Position targetX: number targetY: number targetPosition?: Position } /** * Get a simple bezier path from source to target handle (no curvature) * @public * * @param simpleBezierPathParams * @param simpleBezierPathParams.sourceX - The x position of the source handle * @param simpleBezierPathParams.sourceY - The y position of the source handle * @param simpleBezierPathParams.sourcePosition - The position of the source handle (default: Position.Bottom) * @param simpleBezierPathParams.targetX - The x position of the target handle * @param simpleBezierPathParams.targetY - The y position of the target handle * @param simpleBezierPathParams.targetPosition - The position of the target handle (default: Position.Top) * @returns 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 */ export declare function getSimpleBezierPath(simpleBezierPathParams: GetSimpleBezierPathParams): EdgePathParams