diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-02-26 12:08:04 -0500 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-02-26 12:08:04 -0500 |
commit | 3b822c33e42c562403f057a98f7bc193b5c0327d (patch) | |
tree | b63a75340b7b89d9b62d7168c519185ddb2e17cc /js/reveal.js | |
parent | 40759435e48891f32e72b8da8c7df332976eef48 (diff) | |
download | fosdem-2018-presentation-3b822c33e42c562403f057a98f7bc193b5c0327d.tar fosdem-2018-presentation-3b822c33e42c562403f057a98f7bc193b5c0327d.tar.gz |
disabled overview clicks on slides with disabled class
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/js/reveal.js b/js/reveal.js index 5c658ad..f47006f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1811,19 +1811,23 @@ var Reveal = (function(){ if( eventsAreBound && isOverview() ) { event.preventDefault(); - deactivateOverview(); - var element = event.target; while( element && !element.nodeName.match( /section/gi ) ) { element = element.parentNode; } - if( element.nodeName.match( /section/gi ) ) { - var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ), - v = parseInt( element.getAttribute( 'data-index-v' ), 10 ); + if( element && !element.classList.contains( 'disabled' ) ) { + + deactivateOverview(); + + if( element.nodeName.match( /section/gi ) ) { + var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ), + v = parseInt( element.getAttribute( 'data-index-v' ), 10 ); + + slide( h, v ); + } - slide( h, v ); } } |