1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-07-31 11:50:25 +02:00

switch old toArray helper to Array.from

This commit is contained in:
Hakim El Hattab
2020-03-16 15:18:47 +01:00
parent 6ff4e9306c
commit 2540712714
10 changed files with 111 additions and 113 deletions

View File

@@ -1,4 +1,4 @@
import { extend, toArray, createStyleSheet } from '../utils/util.js'
import { queryAll, extend, createStyleSheet } from '../utils/util.js'
/**
* Automatically animates matching elements across
@@ -87,12 +87,12 @@ export default class AutoAnimate {
reset() {
// Reset slides
toArray( this.Reveal.getRevealElement().querySelectorAll( '[data-auto-animate]:not([data-auto-animate=""])' ) ).forEach( element => {
queryAll( this.Reveal.getRevealElement(), '[data-auto-animate]:not([data-auto-animate=""])' ).forEach( element => {
element.dataset.autoAnimate = '';
} );
// Reset elements
toArray( this.Reveal.getRevealElement().querySelectorAll( '[data-auto-animate-target]' ) ).forEach( element => {
queryAll( this.Reveal.getRevealElement(), '[data-auto-animate-target]' ).forEach( element => {
delete element.dataset.autoAnimateTarget;
} );