aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2019-03-11 14:50:35 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2019-03-11 14:50:35 +0100
commit69ee643846e059c7b49264831c632bdf9701f8e0 (patch)
tree7d45e11ec0a06fb3564a7cdda045e56bd461c760
parentcef864a7be9abe6e53810a83f6a577e83433cc66 (diff)
downloadperl-software-in-gnu-guix-69ee643846e059c7b49264831c632bdf9701f8e0.tar
perl-software-in-gnu-guix-69ee643846e059c7b49264831c632bdf9701f8e0.tar.gz
syncFragments now returns all affected fragments
-rw-r--r--js/reveal.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index f408048..552ba5d 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2975,6 +2975,9 @@
*/
function syncSlide( slide ) {
+ // Default to the current slide
+ slide = slide || Reveal.getCurrentSlide();
+
syncBackground( slide );
syncFragments( slide );
@@ -2991,10 +2994,14 @@
* after reveal.js has already initialized.
*
* @param {HTMLElement} slide
+ * @return {Array} a list of the HTML fragments that were synced
*/
function syncFragments( slide ) {
- sortFragments( slide.querySelectorAll( '.fragment' ) );
+ // Default to the current slide
+ slide = slide || Reveal.getCurrentSlide();
+
+ return sortFragments( slide.querySelectorAll( '.fragment' ) );
}