diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-03-10 18:37:37 +0100 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-03-10 18:37:40 +0100 |
commit | ddbe06eb7efdaae99fb22cba9844eb6c30b3eb59 (patch) | |
tree | 375a4fc3beb074eaa6589a41db0b126b799fe311 /js/index.js | |
parent | 9336fc11ca2ead47b5d07e2a00de3802b368615b (diff) | |
download | fosdem-2021-minimalism-presentation-ddbe06eb7efdaae99fb22cba9844eb6c30b3eb59.tar fosdem-2021-minimalism-presentation-ddbe06eb7efdaae99fb22cba9844eb6c30b3eb59.tar.gz |
adjustments to reveal.js initialization flow
Diffstat (limited to 'js/index.js')
-rw-r--r-- | js/index.js | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/js/index.js b/js/index.js index ccd042a..51b0143 100644 --- a/js/index.js +++ b/js/index.js @@ -1,21 +1,16 @@ import Presentation from './reveal.js' -// The Reveal class can be instantiated to run multiple -// presentations on the same page -// -// let rvl = new Reveal( <HTMLElement>, { controls: false } ) -// rvl.initialize() -// rvl.slide(2) -window.Reveal = Presentation; - -// Simplified way to create a reveal.js instance on -// a page with only one presentation, makes us backwards -// compatible with reveal.js pre 4.0 +// Provides a backwards compatible way to initialize +// reveal.js when there is only one presentation on +// the page. // // Reveal.initialize({ controls: false }) -// Revea.slide(2) -window.Reveal.initialize = options => { - window.Reveal = new Presentation( document.querySelector( '.reveal' ), options ); - window.Reveal.initialize(); - return new Promise( resolve => window.Reveal.addEventListener( 'ready', resolve ) ); +// Reveal.slide(2) +window.Reveal = { + + initialize: options => { + window.Reveal = new Presentation( document.querySelector( '.reveal' ), options ); + return window.Reveal.initialize(); + } + }
\ No newline at end of file |