diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-02-18 20:23:37 +0100 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-02-18 20:23:37 +0100 |
commit | 4eca6253303efebc2473998dfc0e2b594a6afad2 (patch) | |
tree | 2de3bbacbd37fa6fe863904d1dccf85bcfd20f9f /js | |
parent | 4ff7fd3a712b4ecf60ff0d1da1006c2c853d8141 (diff) | |
download | fosdem-2021-minimalism-presentation-4eca6253303efebc2473998dfc0e2b594a6afad2.tar fosdem-2021-minimalism-presentation-4eca6253303efebc2473998dfc0e2b594a6afad2.tar.gz |
remove need for dedicated data-auto-animate-unmatched attribute
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/js/reveal.js b/js/reveal.js index 1f12b94..b585ed6 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3883,10 +3883,10 @@ // need to flag them if( toSlide.dataset.autoAnimateUnmatched ) { getUnmatchedAutoAnimateElements( toSlide ).forEach( function( unmatchedElement ) { - unmatchedElement.dataset.autoAnimateUnmatched = 'fade-in'; + unmatchedElement.dataset.autoAnimateTarget = 'unmatched'; } ); - css.push( '.reveal [data-auto-animate="running"] [data-auto-animate-unmatched] { transition: all '+ (animationOptions.duration*0.8) +'s ease '+ (animationOptions.duration*0.2) +'s; }' ); + css.push( '.reveal [data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: all '+ (animationOptions.duration*0.8) +'s ease '+ (animationOptions.duration*0.2) +'s; }' ); } // Setting the whole chunk of CSS at once is the most @@ -3918,10 +3918,6 @@ delete element.dataset.autoAnimateTarget; } ); - toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack) [data-auto-animate-unmatched]' ) ).forEach( function( element ) { - delete element.dataset.autoAnimateUnmatched; - } ); - } /** @@ -4208,8 +4204,8 @@ /** * Returns a all elements within the given scope that should * be considered unmatched in an auto-animate transition. If - * fading of unmatched elements is turnded on, these elements - * will fade when going between auto-aniamted slides. + * fading of unmatched elements is turned on, these elements + * will fade when going between auto-animate slides. * * Note that parents of auto-animate targets are NOT considerd * unmatched since fading them would break the auto-animation. |