switch old toArray helper to Array.from
This commit is contained in:
1 parent
6ff4e9306c
commit
2540712714
10 files changed
+111
-113
No files matched your search
@@ -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;
|
||||
} );
|
||||
|
||||
|
||||
Reference in new issue
Block a user