File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export const createHandle = () => {
7474 _commit : (
7575 animation : Animation | undefined ,
7676 el : HTMLElement ,
77- getKeys : ( ) => string [ ]
77+ keyframes : TypedKeyframe [ ]
7878 ) => {
7979 if ( ! animation ) return ;
8080 if ( animation . commitStyles ) {
@@ -83,7 +83,7 @@ export const createHandle = () => {
8383 }
8484 // Fallback for commitStyles
8585 const computedStyle = getComputedStyle ( el ) ;
86- getKeys ( ) . forEach ( ( k ) => {
86+ getKeyframeKeys ( keyframes ) . forEach ( ( k ) => {
8787 ( el . style as any ) [ k ] = ( computedStyle as any ) [ k ] ;
8888 } ) ;
8989 } ,
Original file line number Diff line number Diff line change 44 AnimationOptions ,
55 createAnimation ,
66 createHandle ,
7- getKeyframeKeys ,
87 TypedKeyframe ,
98} from "./core" ;
109
@@ -96,9 +95,7 @@ export const useAnimation = (
9695 return externalHandle ;
9796 } ,
9897 commit : ( ) => {
99- handle . _commit ( getAnimation ( ) , getTarget ( ) ! , ( ) =>
100- getKeyframeKeys ( getKeyframes ( ) )
101- ) ;
98+ handle . _commit ( getAnimation ( ) , getTarget ( ) ! , getKeyframes ( ) ) ;
10299 return externalHandle ;
103100 } ,
104101 setTime : ( time ) => {
Original file line number Diff line number Diff line change 44 AnimationOptions ,
55 createAnimation ,
66 createHandle ,
7- getKeyframeKeys ,
87 TypedKeyframe ,
98} from "./core" ;
109import type { WithRef } from "./useAnimation" ;
@@ -98,8 +97,10 @@ export const useAnimations = <ID extends string>(
9897 return externalHandle ;
9998 } ,
10099 commit : ( name ) => {
101- handle . _commit ( getAnimation ( name ) , getTarget ( ) ! , ( ) =>
102- getKeyframeKeys ( toArray ( getKeyframesAndOptions ( name ) [ 0 ] ) )
100+ handle . _commit (
101+ getAnimation ( name ) ,
102+ getTarget ( ) ! ,
103+ toArray ( getKeyframesAndOptions ( name ) [ 0 ] )
103104 ) ;
104105 return externalHandle ;
105106 } ,
You can’t perform that action at this time.
0 commit comments