UNPKG

@antv/x6

Version:

JavaScript diagramming library that uses SVG and HTML for rendering.

20 lines 879 B
"use strict"; var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.normal = void 0; var geometry_1 = require("../../geometry"); var normal = function (sourcePoint, targetPoint, routePoints, options) { if (options === void 0) { options = {}; } var points = __spreadArrays([sourcePoint], routePoints, [targetPoint]); var polyline = new geometry_1.Polyline(points); var path = new geometry_1.Path(polyline); return options.raw ? path : path.serialize(); }; exports.normal = normal; //# sourceMappingURL=normal.js.map