Commit
+14 -2 +/-2 browse
1 | diff --git a/docsite/js/animations.js b/docsite/js/animations.js |
2 | index 9dc3ae3..55adae7 100644 |
3 | --- a/docsite/js/animations.js |
4 | +++ b/docsite/js/animations.js |
5 | @@ -1,9 +1,9 @@ |
6 | - import {toggleIcons} from './easing.js' |
7 | + import {showPlayIcon} from './easing.js' |
8 | |
9 | const cleanup = e => { |
10 | setTimeout(()=> { |
11 | e.target.style = '' |
12 | - toggleIcons(e.target.querySelector('button')) |
13 | + showPlayIcon(e.target.querySelector('button')) |
14 | }, 500) |
15 | } |
16 | |
17 | diff --git a/docsite/js/easing.js b/docsite/js/easing.js |
18 | index 2a40170..d718e4a 100644 |
19 | --- a/docsite/js/easing.js |
20 | +++ b/docsite/js/easing.js |
21 | @@ -18,6 +18,18 @@ export const toggleIcons = button => { |
22 | }) |
23 | } |
24 | |
25 | + export const showPlayIcon = button => { |
26 | + button |
27 | + .querySelectorAll('use') |
28 | + .forEach(icon => { |
29 | + if (icon.getAttribute('href') === '#play-icon') { |
30 | + icon.classList.remove('hidden') |
31 | + } else { |
32 | + icon.classList.add('hidden'); |
33 | + } |
34 | + }) |
35 | + } |
36 | + |
37 | // play buttons |
38 | document |
39 | .querySelectorAll('.play-button') |