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) => {
484484 * @param {HTMLElement } el - The DOM element being animated
485485 * @param {Object } args - The animation's ID and type and all the options passed by the user
486486 */
487- const preset = async ( el , args ) => {
487+ const preset = ( el , args ) => {
488488 const { opts, animationId } = args ;
489489 const { animType } = opts ;
490490 if (
@@ -495,14 +495,14 @@ const preset = async (el, args) => {
495495 )
496496 opts . angle = undefined ;
497497
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+ } ) ;
506506} ;
507507
508508/**
Original file line number Diff line number Diff line change @@ -69,11 +69,12 @@ const getTargets = selector => {
6969 * @see {@link module:globals.PROPERTY_NAMES }
7070 * @see {@link module:animate~configurations }
7171 */
72- const config = async opts => {
72+ const config = opts => {
7373 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+ } ) ;
7778} ;
7879
7980/**
@@ -190,10 +191,10 @@ const animationFunctions = (function () {
190191 'dimensionsTransition' ,
191192 ] . forEach ( opt => ( args [ opt ] = opts [ opt ] ) ) ;
192193
193- getTargets ( target ) . forEach ( async ( element , i ) => {
194+ getTargets ( target ) . forEach ( ( element , i ) => {
194195 opts . animType = animType ;
195196 opts . queryIndex = i ;
196- await preset ( element , {
197+ preset ( element , {
197198 opts,
198199 animationId : id ,
199200 } ) ;
You can’t perform that action at this time.
0 commit comments