Skip to content

Commit 42a7bed

Browse files
committed
shorter
1 parent 0ea91ea commit 42a7bed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/marks/arrow.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ export class Arrow extends Mark {
8888

8989
// If the radius is very large (or even infinite, as when the bend
9090
// angle is zero), then render a straight line.
91-
return r < 1e5
92-
? `M${x1},${y1}A${r},${r} 0,0,${bendAngle > 0 ? 1 : 0} ${x2},${y2}M${x3},${y3}L${x2},${y2}L${x4},${y4}`
93-
: `M${x1},${y1}L${x2},${y2}M${x3},${y3}L${x2},${y2}L${x4},${y4}`;
91+
return `M${x1},${y1}${r < 1e5 ? `A${r},${r} 0,0,${bendAngle > 0 ? 1 : 0} ` : `L`}${x2},${y2}M${x3},${y3}L${x2},${y2}L${x4},${y4}`;
9492
})
9593
.call(applyChannelStyles, this, channels))
9694
.node();

0 commit comments

Comments
 (0)