Skip to content

Commit

Permalink
Fix white outline around Vector tips (#142)
Browse files Browse the repository at this point in the history
Closes #137.
  • Loading branch information
stevenpetryk authored Feb 25, 2024
1 parent 25e5f37 commit 2e9605f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/display/Vector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface VectorProps extends Stroked {
export function Vector({
tail = [0, 0],
tip,
color = Theme.foreground,
color = Theme.red,
weight = 2,
style = "solid",
opacity = 1.0,
Expand All @@ -34,7 +34,7 @@ export function Vector({
<>
<defs>
<marker id={id} markerWidth="8" markerHeight="8" refX="8" refY="4" orient="auto">
<path d="M 0 0 L 8 4 L 0 8 z" fill={color || "var(--mafs-fg)"} />
<path d="M 0 0 L 8 4 L 0 8 z" fill={color || "var(--mafs-fg)"} strokeWidth={0} />
</marker>
</defs>
<line
Expand All @@ -48,6 +48,7 @@ export function Vector({
{...svgLineProps}
style={{
stroke: color || "var(--mafs-fg)",
fill: color,
strokeOpacity: opacity,
...(svgLineProps?.style || {}),
vectorEffect: "non-scaling-stroke",
Expand Down

0 comments on commit 2e9605f

Please sign in to comment.