Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
calculateControlOffset(port: PortModel): [number, number] {
if (port.getOptions().alignment === PortModelAlignment.RIGHT) {
return [this.options.curvyness, 0];
} else if (port.getOptions().alignment === PortModelAlignment.LEFT) {
return [-this.options.curvyness, 0];
} else if (port.getOptions().alignment === PortModelAlignment.TOP) {
return [0, -this.options.curvyness];
}
return [0, this.options.curvyness];
}