Inline velocity normalization, to avoid dependency on updateConfig order
ClosedPublic

Authored by appsforartists on Aug 8 2017, 5:24 PM.

Details

Summary

Velocity normalization should either occur in start()'s rAF or in _evaluateSpring() to ensure consistent behavior if updateConfig is called separately for fromValue, toValue, and initialVelocity. Otherwise, the normalized velocity would depend on the order in which those were set.

Diff Detail

Repository
R51 wobble
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
appsforartists created this revision.Aug 8 2017, 5:24 PM
Restricted Application added a reviewer: skevy. · View Herald TranscriptAug 8 2017, 5:24 PM
Restricted Application completed building Restricted Buildable.Aug 8 2017, 5:26 PM
skevy requested changes to this revision.Aug 8 2017, 5:42 PM
skevy added inline comments.
src/index.js
57

Given the change below, set this to withDefault(config.initialVelocity, 0)

66

we still need to set the initialVelocity in the config. see my comment above

This revision now requires changes to proceed.Aug 8 2017, 5:42 PM
appsforartists marked 2 inline comments as done.

Fixed missing setter for initialVelocity

Good catch; fixed.

Restricted Application completed building Restricted Buildable.Aug 8 2017, 6:12 PM
skevy accepted this revision.Aug 9 2017, 1:01 AM
This revision is now accepted and ready to land.Aug 9 2017, 1:01 AM
This revision was automatically updated to reflect the committed changes.