Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow slides to be uncounted #2543

Merged
merged 1 commit into from
Mar 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4206,8 +4206,11 @@
if( verticalSlides[j].classList.contains( 'present' ) ) {
break mainLoop;
}

pastCount++;
// don't count slides with the "uncounted" class attribute
if( verticalSlides[j].classList.contains( 'uncounted' ) ){
continue;
}
pastCount++;

}

Expand All @@ -4216,10 +4219,12 @@
break;
}

// Don't count the wrapping section for vertical slides
if( horizontalSlide.classList.contains( 'stack' ) === false ) {
pastCount++;
}
// Don't count the wrapping section for vertical slides and slides marked as
// uncounted
if( horizontalSlide.classList.contains( 'stack' ) === false &&
horizontalSlide.classList.contains( 'uncounted' ) === false ) {
pastCount++;
}

}

Expand Down Expand Up @@ -4429,7 +4434,7 @@
*/
function getSlides() {

return toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ));
return toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack):not(.uncounted)' ));

}

Expand Down