@antv/x6
Version:
JavaScript diagramming library that uses SVG and HTML for rendering
8 lines • 363 B
JavaScript
import { Point } from '../../geometry';
import { resolve } from '../node-anchor/util';
export const getClosestPoint = (view, magnet, refPoint, options) => {
const closestPoint = view.getClosestPoint(refPoint);
return closestPoint != null ? closestPoint : new Point();
};
export const closest = resolve(getClosestPoint);
//# sourceMappingURL=closest.js.map