mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
refactoring
This commit is contained in:
parent
d84aa3472e
commit
1f1ca3a887
6 changed files with 19 additions and 13 deletions
|
|
@ -37,11 +37,10 @@ export default class Reader {
|
|||
viewportElement.addEventListener( 'scroll', this.onScroll );
|
||||
|
||||
let presentationBackground;
|
||||
if( viewportElement ) {
|
||||
const viewportStyles = window.getComputedStyle( viewportElement );
|
||||
if( viewportStyles && viewportStyles.background ) {
|
||||
presentationBackground = viewportStyles.background;
|
||||
}
|
||||
|
||||
const viewportStyles = window.getComputedStyle( viewportElement );
|
||||
if( viewportStyles && viewportStyles.background ) {
|
||||
presentationBackground = viewportStyles.background;
|
||||
}
|
||||
|
||||
const pageElements = [];
|
||||
|
|
@ -59,8 +58,7 @@ export default class Reader {
|
|||
page.className = 'reader-page';
|
||||
pageElements.push( page );
|
||||
|
||||
// Copy the presentation-wide background to each individual
|
||||
// page when printing
|
||||
// Copy the presentation-wide background to each page
|
||||
if( presentationBackground ) {
|
||||
page.style.background = presentationBackground;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue