Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
server
team-presentation
Commits
0388c96e
Commit
0388c96e
authored
May 24, 2017
by
Hakim El Hattab
Browse files
'showNotes' does nothing when there are no notes
parent
53c56510
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/reveal.js
View file @
0388c96e
...
...
@@ -1051,12 +1051,8 @@
}
if
(
config
.
showNotes
)
{
dom
.
wrapper
.
classList
.
add
(
'
show-notes
'
);
dom
.
speakerNotes
.
setAttribute
(
'
data-layout
'
,
typeof
config
.
showNotes
===
'
string
'
?
config
.
showNotes
:
'
inline
'
);
}
else
{
dom
.
wrapper
.
classList
.
remove
(
'
show-notes
'
);
}
if
(
config
.
mouseWheel
)
{
document
.
addEventListener
(
'
DOMMouseScroll
'
,
onDocumentMouseScroll
,
false
);
// FF
...
...
@@ -2489,6 +2485,7 @@
updateSlideNumber
();
updateSlidesVisibility
();
updateBackground
(
true
);
updateNotesVisibility
();
updateNotes
();
formatEmbeddedContent
();
...
...
@@ -2794,6 +2791,33 @@
}
/**
* Updates the visibility of the speaker notes sidebar that
* is used to share annotated slides. The notes sidebar is
* only visible if showNotes is true and there are notes on
* one or more slides in the deck.
*/
function
updateNotesVisibility
()
{
if
(
config
.
showNotes
&&
hasNotes
()
)
{
dom
.
wrapper
.
classList
.
add
(
'
show-notes
'
);
}
else
{
dom
.
wrapper
.
classList
.
remove
(
'
show-notes
'
);
}
}
/**
* Checks if there are speaker notes for ANY slide in the
* presentation.
*/
function
hasNotes
()
{
return
dom
.
slides
.
querySelectorAll
(
'
[data-notes], aside.notes
'
).
length
>
0
;
}
/**
* Updates the progress bar to reflect the current slide.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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