refactor: ♻️ auto format

This commit is contained in:
bubkoo
2021-02-22 15:45:53 +08:00
parent 1abe68387a
commit 45f50a0e2f

View File

@ -25,9 +25,13 @@ export const smooth: Connector.Definition<SmoothConnectorOptions> = function (
path = new Path()
path.appendSegment(Path.createSegment('M', sourcePoint))
if (!direction) {
direction = Math.abs(sourcePoint.x - targetPoint.x) >= Math.abs(sourcePoint.y - targetPoint.y) ? 'H' : 'V'
direction =
Math.abs(sourcePoint.x - targetPoint.x) >=
Math.abs(sourcePoint.y - targetPoint.y)
? 'H'
: 'V'
}
if (direction === 'H') {