1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-07-31 20:00:28 +02:00

move slide backgrounds to new module

This commit is contained in:
Hakim El Hattab
2020-03-14 09:25:48 +01:00
parent b42bb586a8
commit f7c29b788e
3 changed files with 426 additions and 408 deletions

View File

@@ -247,6 +247,20 @@ export default class Fragments {
}
/**
* 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
* @return {Array} a list of the HTML fragments that were synced
*/
sync( slide = this.Reveal.getCurrentSlide() ) {
return this.sort( slide.querySelectorAll( '.fragment' ) );
}
/**
* Navigate to the specified slide fragment.
*