From 69ee643846e059c7b49264831c632bdf9701f8e0 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 11 Mar 2019 14:50:35 +0100 Subject: [PATCH] syncFragments now returns all affected fragments --- js/reveal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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' ) ); }