@antv/util
Version:
> AntV 底层依赖的工具库,不建议在自己业务中使用。
16 lines • 731 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTotalLength = void 0;
var tslib_1 = require("tslib");
var path_length_factory_1 = require("./path-length-factory");
/**
* Returns the shape total length, or the equivalent to `shape.getTotalLength()`.
*
* The `normalizePath` version is lighter, faster, more efficient and more accurate
* with paths that are not `curveArray`.
*/
function getTotalLength(pathInput, options) {
return (0, path_length_factory_1.pathLengthFactory)(pathInput, undefined, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), { bbox: false, length: true })).length;
}
exports.getTotalLength = getTotalLength;
//# sourceMappingURL=get-total-length.js.map