Files
bpmn-js/lib/features/modeling/behavior/util/ConnectionLayoutUtil.js
2023-04-19 12:18:42 +02:00

23 lines
641 B
JavaScript

import { getAnchorPointAdjustment } from './LayoutUtil';
/**
* @typedef {import('diagram-js/lib/util/Types').Point} Point
*
* @typedef {import('./LayoutUtil').FindNewLineStartIndexHints} FindNewLineStartIndexHints
*/
/**
* Calculate the new point after the connection waypoints got updated.
*
* @param {Point} position
* @param {Point[]} newWaypoints
* @param {Point[]} oldWaypoints
* @param {FindNewLineStartIndexHints} hints
*
* @return {Point}
*/
export function getConnectionAdjustment(position, newWaypoints, oldWaypoints, hints) {
return getAnchorPointAdjustment(position, newWaypoints, oldWaypoints, hints).point;
}