Files
vue-flow/.changeset/curly-ligers-end.md
T
2022-10-08 23:25:34 +02:00

905 B

@vue-flow/additional-components, @vue-flow/pathfinding-edge, @vue-flow/resize-rotate-node, @vue-flow/core
@vue-flow/additional-components @vue-flow/pathfinding-edge @vue-flow/resize-rotate-node @vue-flow/core
major major major major

What's changed?

  • Simplify edge path calculations
    • remove getEdgeCenter and getSimpleEdgeCenter

Breaking Changes

  • getEdgeCenter has been removed
    • Edge center positions can now be accessed from getBezierPath or getSmoothStepPath functions

Before:

import { getBezierPath, getEdgeCenter } from '@braks/vue-flow'

// used to return the path string only
const edgePath = computed(() => getBezierPath(pathParams),)

// was necessary to get the centerX, centerY of an edge
const centered = computed(() => getEdgeCenter(centerParams))

After:

import { getBezierPath } from '@vue-flow/core'

// returns the path string and the center positions
const [path, centerX, centerY] = computed(() => getBezierPath(pathParams),)