Skip to content

Commit

Permalink
fix: pathEnd should be equal to 1 initially (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon20000 authored Jun 13, 2022
1 parent 000cd1d commit df0b8b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AnimatedLineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ export function AnimatedLineGraph({
useAnimatedReaction(
() => x.value,
(fingerX) => {
runOnJS(setFingerX)(fingerX)
if (isActive.value) {
runOnJS(setFingerX)(fingerX)
}
},
[isActive, setFingerX, width, x]
)
Expand Down

0 comments on commit df0b8b2

Please sign in to comment.