Skip to content

Commit 717273d

Browse files
committed
Updating comments
1 parent 84ae182 commit 717273d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/framer-motion/src/animation/interfaces/motion-value.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,18 @@ export const animateMotionValue = (
118118
* Animate via WAAPI if possible.
119119
*/
120120
if (
121+
/**
122+
* If this is a handoff animation, the optimised animation will be running via
123+
* WAAPI. Therefore, this animation must be JS to ensure it runs "under" the
124+
* optimised animation.
125+
*/
121126
!transition.isHandoff &&
122127
value.owner &&
123128
value.owner.current instanceof HTMLElement &&
129+
/**
130+
* If we're outputting values to onUpdate then we can't use WAAPI as there's
131+
* no way to read the value from WAAPI every frame.
132+
*/
124133
!value.owner.getProps().onUpdate
125134
) {
126135
const acceleratedAnimation = createAcceleratedAnimation(

0 commit comments

Comments
 (0)