1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-10-29 04:40:02 +01:00

Add controls: 'speaker-only' option

This commit is contained in:
gpotter2
2025-01-11 16:41:06 +01:00
parent e15cf92ccd
commit 3751715414
2 changed files with 7 additions and 2 deletions

View File

@@ -66,7 +66,10 @@ export default class Controls {
*/
configure( config, oldConfig ) {
this.element.style.display = config.controls ? 'block' : 'none';
this.element.style.display = (
config.controls &&
(config.controls !== 'speaker-only' || this.Reveal.isSpeakerNotes())
) ? 'block' : 'none';
this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
this.element.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );