Skip to content

Commit

Permalink
Style freehand lines with CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jul 12, 2024
1 parent 3991222 commit e64bca0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const GRAB_STROKE_WIDTH = 10
const FINISHER_RADIUS = 4

const StyledGroup = styled.g`
stroke-width: 2px;
stroke-linecap: round;
stroke-linejoin: round;
&:hover {
cursor: pointer;
}
Expand Down Expand Up @@ -118,10 +122,7 @@ function FreehandLine({ active, mark, onFinish, scale }) {
<path // Main Path that's visible
d={pointsToPath(pts)}
fill='none'
strokeWidth={STROKE_WIDTH}
strokeOpacity={1}
strokeLinecap='round'
strokeLinejoin='round'
vectorEffect={'non-scaling-stroke'}
/>
<title>{getHoverText()}</title>
Expand All @@ -140,7 +141,6 @@ function FreehandLine({ active, mark, onFinish, scale }) {
<path // Clipped Path
d={pointsToPath(mark.splicePathRender)}
strokeDasharray='2 2'
strokeWidth={STROKE_WIDTH}
opacity=".4"
vectorEffect={'non-scaling-stroke'}
/>
Expand Down

0 comments on commit e64bca0

Please sign in to comment.