File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ const getAction = (element, animType) => {
484
484
* @param {HTMLElement } el - The DOM element being animated
485
485
* @param {Object } args - The animation's ID and type and all the options passed by the user
486
486
*/
487
- const preset = async ( el , args ) => {
487
+ const preset = ( el , args ) => {
488
488
const { opts, animationId } = args ;
489
489
const { animType } = opts ;
490
490
if (
@@ -495,14 +495,14 @@ const preset = async (el, args) => {
495
495
)
496
496
opts . angle = undefined ;
497
497
498
- await updateCssProperties ( el , opts ) ;
499
-
500
- if ( opts . staggerDelay ) {
501
- const staggeredDelay =
502
- getTimeInMs ( opts . delay ) +
503
- getTimeInMs ( opts . staggerDelay ) * opts . queryIndex ;
504
- setCssProperty ( el , 'delay' , ` ${ staggeredDelay } ms` ) ;
505
- }
498
+ updateCssProperties ( el , opts ) . then ( ( ) => {
499
+ if ( opts . staggerDelay ) {
500
+ const staggeredDelay =
501
+ getTimeInMs ( opts . delay ) +
502
+ getTimeInMs ( opts . staggerDelay ) * opts . queryIndex ;
503
+ setCssProperty ( el , 'delay' , ` ${ staggeredDelay } ms` ) ;
504
+ }
505
+ } ) ;
506
506
} ;
507
507
508
508
/**
Original file line number Diff line number Diff line change @@ -69,11 +69,12 @@ const getTargets = selector => {
69
69
* @see {@link module:globals.PROPERTY_NAMES }
70
70
* @see {@link module:animate~configurations }
71
71
*/
72
- const config = async opts => {
72
+ const config = opts => {
73
73
updateDefaultConfig ( opts ) ;
74
- await updateCssProperties ( document . documentElement , opts ) ;
75
- if ( opts . cursor )
76
- setCssProperty ( document . documentElement , 'cursor' , opts . cursor ) ;
74
+ updateCssProperties ( document . documentElement , opts ) . then ( ( ) => {
75
+ if ( opts . cursor )
76
+ setCssProperty ( document . documentElement , 'cursor' , opts . cursor ) ;
77
+ } ) ;
77
78
} ;
78
79
79
80
/**
@@ -190,10 +191,10 @@ const animationFunctions = (function () {
190
191
'dimensionsTransition' ,
191
192
] . forEach ( opt => ( args [ opt ] = opts [ opt ] ) ) ;
192
193
193
- getTargets ( target ) . forEach ( async ( element , i ) => {
194
+ getTargets ( target ) . forEach ( ( element , i ) => {
194
195
opts . animType = animType ;
195
196
opts . queryIndex = i ;
196
- await preset ( element , {
197
+ preset ( element , {
197
198
opts,
198
199
animationId : id ,
199
200
} ) ;
You can’t perform that action at this time.
0 commit comments