Skip to content

Commit

Permalink
new syncFragments api method
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed May 31, 2018
1 parent 30b670c commit 4672801
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2682,8 +2682,7 @@
function syncSlide( slide ) {

syncBackground( slide );

sortFragments( slide.querySelectorAll( '.fragment' ) );
syncFragments( slide );

updateBackground();
updateNotes();
Expand All @@ -2692,6 +2691,19 @@

}

/**
* Formats the fragments on the given slide so that they have
* valid indices. Call this if fragments are changed in the DOM
* after reveal.js has already initialized.
*
* @param {HTMLElement} slide
*/
function syncFragments( slide ) {

sortFragments( slide.querySelectorAll( '.fragment' ) );

}

/**
* Resets all vertical slides so that only the first
* is visible.
Expand Down Expand Up @@ -5297,8 +5309,10 @@

initialize: initialize,
configure: configure,

sync: sync,
syncSlide: syncSlide,
syncFragments: syncFragments,

// Navigation methods
slide: slide,
Expand Down

0 comments on commit 4672801

Please sign in to comment.