Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
server
team-presentation
Commits
4022cbfe
Commit
4022cbfe
authored
Nov 21, 2017
by
Hakim El Hattab
Browse files
simplify logic for finding slide backgrounds
parent
28d6a777
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/reveal.js
View file @
4022cbfe
...
...
@@ -3869,25 +3869,12 @@
*/
function
getSlideBackground
(
x
,
y
)
{
// When printing to PDF the slide backgrounds are nested
// inside of the slides
if
(
isPrintingPDF
()
)
{
var
slide
=
getSlide
(
x
,
y
);
if
(
slide
)
{
return
slide
.
slideBackgroundElement
;
}
return
undefined
;
}
var
horizontalBackground
=
dom
.
wrapper
.
querySelectorAll
(
'
.backgrounds>.slide-background
'
)[
x
];
var
verticalBackgrounds
=
horizontalBackground
&&
horizontalBackground
.
querySelectorAll
(
'
.slide-background
'
);
if
(
verticalBackgrounds
&&
verticalBackgrounds
.
length
&&
typeof
y
===
'
number
'
)
{
return
verticalBackgrounds
?
verticalBackgrounds
[
y
]
:
undefined
;
var
slide
=
getSlide
(
x
,
y
);
if
(
slide
)
{
return
slide
.
slideBackgroundElement
;
}
return
horizontalBackgroun
d
;
return
undefine
d
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment