mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
Reveal.configure() now works pre-initialization
This commit is contained in:
parent
5e4c5c33a9
commit
eb026f79b4
5 changed files with 18 additions and 6 deletions
12
js/reveal.js
12
js/reveal.js
|
|
@ -47,7 +47,7 @@ export default function( revealElement, options ) {
|
|||
const Reveal = {};
|
||||
|
||||
// Configuration defaults, can be overridden at initialization time
|
||||
let config,
|
||||
let config = {},
|
||||
|
||||
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
|
||||
ready = false,
|
||||
|
|
@ -125,8 +125,14 @@ export default function( revealElement, options ) {
|
|||
dom.wrapper = revealElement;
|
||||
dom.slides = revealElement.querySelector( '.slides' );
|
||||
|
||||
// Compose our config object
|
||||
config = { ...defaultConfig, ...options, ...initOptions, ...Util.getQueryHash() };
|
||||
// Compose our config object in order of increasing precedence:
|
||||
// 1. Default reveal.js options
|
||||
// 2. Options provided via Reveal.configure() prior to
|
||||
// initialization
|
||||
// 3. Options passed to the Reveal constructor
|
||||
// 4. Options passed to Reveal.initialize
|
||||
// 5. Query params
|
||||
config = { ...defaultConfig, ...config, ...options, ...initOptions, ...Util.getQueryHash() };
|
||||
|
||||
setViewport();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue