-
-
Save ByK95/7c29ac50a4147ac37fe07cc878e96f52 to your computer and use it in GitHub Desktop.
Reveal.js events for slide navigation via mouse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("mousedown", handleClick, false); | |
window.addEventListener("contextmenu", function(e) { e.preventDefault(); }, false); | |
//FIXME:disable this when user in ESC view | |
//TODO:check same for zoom view | |
function handleClick(e) { | |
e.preventDefault(); | |
if(e.button === 0) Reveal.next(); | |
if(e.button === 2) Reveal.prev(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment