api methods for adding/removing all event listeners (#48)
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 2 Jun 2012 22:37:18 +0000 (18:37 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 2 Jun 2012 22:37:18 +0000 (18:37 -0400)
js/reveal.js
js/reveal.min.js

index c51f87b96e514a004e748f4579c8e088909e8dfa..c1f50b8088a145f504e9a08b1b96a56213a5318c 100644 (file)
@@ -908,6 +908,9 @@ var Reveal = (function(){
                navigateDown: navigateDown,
                toggleOverview: toggleOverview,
 
+               addEventListeners: addEventListeners,
+               removeEventListeners: removeEventListeners,
+
                // Forward event binding to the reveal DOM element
                addEventListener: function( type, listener, useCapture ) {
                        ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
index 6cf8e84114412619d6af2d63e1822a862b444d4c..37f6cbeac8862ab44702a549f079e973101ae21f 100644 (file)
@@ -56,5 +56,5 @@ if(W.length){W[W.length-1].classList.remove("visible");o("fragmenthidden",{fragm
 if(V.length){V[V.length-1].classList.remove("visible");o("fragmenthidden",{fragment:V[0]});return true;}}return false;}function F(W,V){k=W===undefined?k:W;
 c=V===undefined?c:V;b();}function w(){if(O()||G()===false){k--;c=0;b();}}function i(){if(O()||s()===false){k++;c=0;b();}}function r(){if(O()||G()===false){c--;
 b();}}function A(){if(O()||s()===false){c++;b();}}function N(){if(G()===false){if(f().up){r();}else{var V=document.querySelector(".reveal .slides>section.past:nth-child("+k+")");
-if(V){c=(V.querySelectorAll("section").length+1)||0;k--;b();}}}}function u(){if(s()===false){f().down?A():i();}}function M(){if(O()){Q();}else{B();}}return{initialize:h,navigateTo:F,navigateLeft:w,navigateRight:i,navigateUp:r,navigateDown:A,toggleOverview:M,addEventListener:function(W,X,V){(d.wrapper||document.querySelector(".reveal")).addEventListener(W,X,V);
+if(V){c=(V.querySelectorAll("section").length+1)||0;k--;b();}}}}function u(){if(s()===false){f().down?A():i();}}function M(){if(O()){Q();}else{B();}}return{initialize:h,navigateTo:F,navigateLeft:w,navigateRight:i,navigateUp:r,navigateDown:A,toggleOverview:M,addEventListeners:z,removeEventListeners:K,addEventListener:function(W,X,V){(d.wrapper||document.querySelector(".reveal")).addEventListener(W,X,V);
 },removeEventListener:function(W,X,V){(d.wrapper||document.querySelector(".reveal")).removeEventListener(W,X,V);}};})();
\ No newline at end of file