minor refactoring of overview code
This commit is contained in:
parent
cf8b004052
commit
e9b0f5b481
|
@ -1050,8 +1050,8 @@ body {
|
||||||
|
|
||||||
.reveal.fade.overview .slides section,
|
.reveal.fade.overview .slides section,
|
||||||
.reveal.fade.overview .slides>section>section,
|
.reveal.fade.overview .slides>section>section,
|
||||||
.reveal.fade.exit-overview .slides section,
|
.reveal.fade.overview-deactivating .slides section,
|
||||||
.reveal.fade.exit-overview .slides>section>section {
|
.reveal.fade.overview-deactivating .slides>section>section {
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
-ms-transition: none;
|
-ms-transition: none;
|
||||||
|
|
File diff suppressed because one or more lines are too long
22
js/reveal.js
22
js/reveal.js
|
@ -1156,7 +1156,7 @@ var Reveal = (function(){
|
||||||
var depth = window.innerWidth < 400 ? 1000 : 2500;
|
var depth = window.innerWidth < 400 ? 1000 : 2500;
|
||||||
|
|
||||||
dom.wrapper.classList.add( 'overview' );
|
dom.wrapper.classList.add( 'overview' );
|
||||||
dom.wrapper.classList.remove( 'exit-overview' );
|
dom.wrapper.classList.remove( 'overview-deactivating' );
|
||||||
|
|
||||||
clearTimeout( activateOverviewTimeout );
|
clearTimeout( activateOverviewTimeout );
|
||||||
clearTimeout( deactivateOverviewTimeout );
|
clearTimeout( deactivateOverviewTimeout );
|
||||||
|
@ -1241,25 +1241,19 @@ var Reveal = (function(){
|
||||||
// Temporarily add a class so that transitions can do different things
|
// Temporarily add a class so that transitions can do different things
|
||||||
// depending on whether they are exiting/entering overview, or just
|
// depending on whether they are exiting/entering overview, or just
|
||||||
// moving from slide to slide
|
// moving from slide to slide
|
||||||
dom.wrapper.classList.add( 'exit-overview' );
|
dom.wrapper.classList.add( 'overview-deactivating' );
|
||||||
|
|
||||||
deactivateOverviewTimeout = setTimeout( function () {
|
deactivateOverviewTimeout = setTimeout( function () {
|
||||||
dom.wrapper.classList.remove( 'exit-overview' );
|
dom.wrapper.classList.remove( 'overview-deactivating' );
|
||||||
}, 10);
|
}, 1 );
|
||||||
|
|
||||||
// Select all slides
|
// Select all slides
|
||||||
var slides = toArray( document.querySelectorAll( SLIDES_SELECTOR ) );
|
toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
|
||||||
|
|
||||||
for( var i = 0, len = slides.length; i < len; i++ ) {
|
|
||||||
var element = slides[i];
|
|
||||||
|
|
||||||
element.style.display = '';
|
|
||||||
|
|
||||||
// Resets all transforms to use the external styles
|
// Resets all transforms to use the external styles
|
||||||
transformElement( element, '' );
|
transformElement( slide, '' );
|
||||||
|
|
||||||
element.removeEventListener( 'click', onOverviewSlideClicked, true );
|
slide.removeEventListener( 'click', onOverviewSlideClicked, true );
|
||||||
}
|
} );
|
||||||
|
|
||||||
slide( indexh, indexv );
|
slide( indexh, indexv );
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue