Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[0, 0],
[1, 1],
];
Util.each(points, (point) => {
if (
!prePoint ||
!(prePoint.x === point.x && prePoint.y === point.y)
) {
data.push(point.x);
data.push(point.y);
prePoint = point;
}
});
const spline = PathUtil.catmullRomToBezier(data, false, constaint);
let path =
'M' + first.x + ' ' + first.y + PathUtil.parsePathArray(spline);
path = PathUtil.pathToAbsolute(path);
path = this.parsePath(path, false);
return container.addShape('path', {
attrs: {
fill: cfg.color || '#00D9DF',
path: path,
},
});
},
});