Skip to content

Commit

Permalink
Merge pull request #31 from marcusstenbeck/patch-1
Browse files Browse the repository at this point in the history
Reset frame time when toValue changes
  • Loading branch information
wcandillon authored May 29, 2019
2 parents 07fd60f + efa397a commit 676ceb5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AnimationRunners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const {
set,
startClock,
clockRunning,
onChange,
} = Animated;

export function runDecay(
Expand Down Expand Up @@ -96,6 +97,7 @@ export function runTiming(
};

return block([
onChange(config.toValue, set(state.frameTime, 0)),
cond(clockRunning(clock), 0, [
set(state.finished, 0),
set(state.time, 0),
Expand Down

0 comments on commit 676ceb5

Please sign in to comment.