use config
authordanielmitd <daniel@healthycod.in>
Sun, 10 Jun 2012 09:51:11 +0000 (11:51 +0200)
committerdanielmitd <daniel@healthycod.in>
Sun, 10 Jun 2012 09:51:11 +0000 (11:51 +0200)
js/reveal.js

index cb4e3f986308e14f76e9cd821e4d07c122576ef0..50b86405eb0487e2ba4fbe6b7406c359ba8fb50f 100644 (file)
@@ -160,7 +160,7 @@ var Reveal = (function(){
                document.addEventListener( 'touchend', onDocumentTouchEnd, false );
                window.addEventListener( 'hashchange', onWindowHashChange, false );
 
-               if (dom.controls) {
+               if (config.controls && dom.controls) {
                        dom.controlsLeft.addEventListener( 'click', preventAndForward( navigateLeft ), false );
                        dom.controlsRight.addEventListener( 'click', preventAndForward( navigateRight ), false );
                        dom.controlsUp.addEventListener( 'click', preventAndForward( navigateUp ), false );
@@ -175,7 +175,7 @@ var Reveal = (function(){
                document.removeEventListener( 'touchend', onDocumentTouchEnd, false );
                window.removeEventListener( 'hashchange', onWindowHashChange, false );
                
-               if (dom.controls) {
+               if (config.controls && dom.controls) {
                        dom.controlsLeft.removeEventListener( 'click', preventAndForward( navigateLeft ), false );
                        dom.controlsRight.removeEventListener( 'click', preventAndForward( navigateRight ), false );
                        dom.controlsUp.removeEventListener( 'click', preventAndForward( navigateUp ), false );
@@ -699,7 +699,7 @@ var Reveal = (function(){
         * Updates the state and link pointers of the controls.
         */
        function updateControls() {
-               if (!dom.controls) return;
+               if (!config.controls || !dom.controls) return;
                
                var routes = availableRoutes();