Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getSVGPath(): string {
if (this.points.length == 2) {
const curve = new BezierCurve();
curve.setSource(this.getFirstPoint().getPosition());
curve.setTarget(this.getLastPoint().getPosition());
curve.setSourceControl(
this.getFirstPoint()
.getPosition()
.clone()
);
curve.setTargetControl(
this.getLastPoint()
.getPosition()
.clone()
);
if (this.sourcePort) {
curve.getSourceControl().translate(...this.calculateControlOffset(this.getSourcePort()));
}