aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2019-01-23 10:30:29 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2019-01-23 10:30:29 +0100
commit481208f43fda7270a6ac628a412b32120bfc9018 (patch)
tree5d8cfcb9f54d02e029a83ac5b074e70cf8aa83b7 /js
parent2fa3ab6a6bf9083877dfe46257857a2ab019c293 (diff)
downloadperl-software-in-gnu-guix-481208f43fda7270a6ac628a412b32120bfc9018.tar
perl-software-in-gnu-guix-481208f43fda7270a6ac628a412b32120bfc9018.tar.gz
hide vertical arrows when navigationMode is 'linear' #2307
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index ba69d1a..cee39e2 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1362,6 +1362,14 @@
dom.slideNumber.style.display = slideNumberDisplay;
+ // Add the navigation mode to the DOM so we can adjust styling
+ if( config.navigationMode !== 'default' ) {
+ dom.wrapper.setAttribute( 'data-navigation-mode', config.navigationMode );
+ }
+ else {
+ dom.wrapper.removeAttribute( 'data-navigation-mode' );
+ }
+
sync();
}
@@ -5316,8 +5324,8 @@
/**
* Event handler for navigation control buttons.
*/
- function onNavigateLeftClicked( event ) { event.preventDefault(); onUserInput(); navigateLeft(); }
- function onNavigateRightClicked( event ) { event.preventDefault(); onUserInput(); navigateRight(); }
+ function onNavigateLeftClicked( event ) { event.preventDefault(); onUserInput(); config.navigationMode === 'linear' ? navigatePrev() : navigateLeft(); }
+ function onNavigateRightClicked( event ) { event.preventDefault(); onUserInput(); config.navigationMode === 'linear' ? navigateNext() : navigateRight(); }
function onNavigateUpClicked( event ) { event.preventDefault(); onUserInput(); navigateUp(); }
function onNavigateDownClicked( event ) { event.preventDefault(); onUserInput(); navigateDown(); }
function onNavigatePrevClicked( event ) { event.preventDefault(); onUserInput(); navigatePrev(); }