Skip to content

Commit

Permalink
Use polygon for cleaner filled triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
timdp committed Jun 4, 2020
1 parent 941e126 commit 4d49b25
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Binary file modified examples/concatAll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/concatAll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions packages/swirly-renderer/src/arrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ export const renderArrow = (
`${width},${y}`,
`${width - arrowheadWidth},${y2}`
]
if (filled) {
points.push(points[0])
}

$group.appendChild(
createElement(document, 'polyline', {
createElement(document, filled ? 'polygon' : 'polyline', {
points: points.join(' '),
fill: filled ? fillColor : 'none',
stroke: arrowStyles.stroke_color!,
Expand Down

0 comments on commit 4d49b25

Please sign in to comment.