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](

21 lines (19 loc) 816 B
import type { EdgePathParams } from './general' export interface GetStraightPathParams { sourceX: number sourceY: number targetX: number targetY: number } /** * Get a straight path from source to target handle * @public * * @param straightEdgeParams * @param straightEdgeParams.sourceX - The x position of the source handle * @param straightEdgeParams.sourceY - The y position of the source handle * @param straightEdgeParams.targetX - The x position of the target handle * @param straightEdgeParams.targetY - The y position of the target handle * @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 getStraightPath(straightEdgeParams: GetStraightPathParams): EdgePathParams