diff options
-rw-r--r-- | index.html | 1 | ||||
-rw-r--r-- | js/reveal.js | 46 |
2 files changed, 39 insertions, 8 deletions
@@ -37,6 +37,7 @@ // - https://github.com/hakimel/reveal.js#configuration // - https://github.com/hakimel/reveal.js#dependencies Reveal.initialize({ + hash: true, dependencies: [ { src: 'plugin/markdown/marked.js' }, { src: 'plugin/markdown/markdown.js' }, diff --git a/js/reveal.js b/js/reveal.js index 4aa50aa..ef7ce49 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1453,8 +1453,8 @@ keyboardShortcuts['↓ , J'] = 'Navigate down'; } - keyboardShortcuts['Home , ⌘/CTRL ←'] = 'First slide'; - keyboardShortcuts['End , ⌘/CTRL →'] = 'Last slide'; + keyboardShortcuts['Home , Shift ←'] = 'First slide'; + keyboardShortcuts['End , Shift →'] = 'Last slide'; keyboardShortcuts['B , .'] = 'Pause'; keyboardShortcuts['F'] = 'Fullscreen'; keyboardShortcuts['ESC, O'] = 'Slide overview'; @@ -5192,8 +5192,8 @@ // Whitelist specific modified + keycode combinations var prevSlideShortcut = event.shiftKey && event.keyCode === 32; - var firstSlideShortcut = ( event.metaKey || event.ctrlKey ) && keyCode === 37; - var lastSlideShortcut = ( event.metaKey || event.ctrlKey ) && keyCode === 39; + var firstSlideShortcut = event.shiftKey && keyCode === 37; + var lastSlideShortcut = event.shiftKey && keyCode === 39; // Prevent all other events when a modifier is pressed var unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut && @@ -5436,19 +5436,49 @@ if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { touch.captured = true; - navigateLeft(); + if( config.navigationMode === 'linear' ) { + if( config.rtl ) { + navigateNext(); + } + else { + navigatePrev(); + } + } + else { + navigateLeft(); + } } else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { touch.captured = true; - navigateRight(); + if( config.navigationMode === 'linear' ) { + if( config.rtl ) { + navigatePrev(); + } + else { + navigateNext(); + } + } + else { + navigateRight(); + } } else if( deltaY > touch.threshold ) { touch.captured = true; - navigateUp(); + if( config.navigationMode === 'linear' ) { + navigatePrev(); + } + else { + navigateUp(); + } } else if( deltaY < -touch.threshold ) { touch.captured = true; - navigateDown(); + if( config.navigationMode === 'linear' ) { + navigateNext(); + } + else { + navigateDown(); + } } // If we're embedded, only block touch events if they have |