disabled overview clicks on slides with disabled class
This commit is contained in:
parent
40759435e4
commit
3b822c33e4
3 changed files with 58 additions and 8 deletions
16
js/reveal.js
16
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
js/reveal.min.js
vendored
4
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue