Skip to content

Commit 6527f4d

Browse files
authored
Merge pull request #3716 from gpotter2/controls-for-speaker
Add 'controlsOnlyForSpeaker' option
2 parents e15cf92 + 3751715 commit 6527f4d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

js/config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export default {
1515
minScale: 0.2,
1616
maxScale: 2.0,
1717

18-
// Display presentation control arrows
18+
// Display presentation control arrows.
19+
// This can be a boolean (true / false) or 'speaker-only' to only display
20+
// the controls on the speaker's screen.
1921
controls: true,
2022

2123
// Help the user learn the controls by providing hints, for example by

js/controllers/controls.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export default class Controls {
6666
*/
6767
configure( config, oldConfig ) {
6868

69-
this.element.style.display = config.controls ? 'block' : 'none';
69+
this.element.style.display = (
70+
config.controls &&
71+
(config.controls !== 'speaker-only' || this.Reveal.isSpeakerNotes())
72+
) ? 'block' : 'none';
7073

7174
this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
7275
this.element.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );

0 commit comments

Comments
 (0)