mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-10-29 12:46:34 +01:00
reader mode tests
This commit is contained in:
20
js/reveal.js
20
js/reveal.js
@@ -249,24 +249,18 @@ export default function( revealElement, options ) {
|
||||
// Avoid content flickering during layout
|
||||
dom.viewport.classList.add( 'loading-scroll-mode' );
|
||||
|
||||
const activate = () => {
|
||||
if( activatePrintView ) {
|
||||
if( activatePrintView ) {
|
||||
// The document needs to have loaded for the PDF layout
|
||||
// measurements to be accurate
|
||||
if( document.readyState === 'complete' ) {
|
||||
print.activate();
|
||||
}
|
||||
else {
|
||||
reader.activate();
|
||||
window.addEventListener( 'load', () => print.activate() );
|
||||
}
|
||||
};
|
||||
|
||||
// The document needs to have loaded for the PDF layout
|
||||
// measurements to be accurate
|
||||
if( document.readyState === 'complete' ) {
|
||||
activate();
|
||||
}
|
||||
else {
|
||||
window.addEventListener( 'load', () => {
|
||||
activate();
|
||||
} );
|
||||
reader.activate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2784,7 +2778,7 @@ export default function( revealElement, options ) {
|
||||
toggleOverview: overview.toggle.bind( overview ),
|
||||
|
||||
// Toggles the reader mode on/off
|
||||
toggleReader: reader.toggle.bind( reader ),
|
||||
toggleReaderMode: reader.toggle.bind( reader ),
|
||||
|
||||
// Toggles the "black screen" mode on/off
|
||||
togglePause,
|
||||
|
||||
Reference in New Issue
Block a user