1
0
Fork 0

don't transition to first slide background (#453)

This commit is contained in:
Hakim El Hattab 2013-06-04 19:51:06 +02:00
parent 90811b8709
commit bfadfcc7ce
4 changed files with 20 additions and 10 deletions

View File

@ -1245,12 +1245,13 @@ body {
left: 0; left: 0;
} }
.no-transition { .no-transition,
-webkit-transition: none; .no-transition * {
-moz-transition: none; -webkit-transition: none !important;
-ms-transition: none; -moz-transition: none !important;
-o-transition: none; -ms-transition: none !important;
transition: none; -o-transition: none !important;
transition: none !important;
} }

2
css/reveal.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -252,6 +252,7 @@ var Reveal = (function(){
// Clear prior backgrounds // Clear prior backgrounds
dom.background.innerHTML = ''; dom.background.innerHTML = '';
dom.background.classList.add( 'no-transition' );
// Helper method for creating a background element for the // Helper method for creating a background element for the
// given slide // given slide
@ -1463,10 +1464,13 @@ var Reveal = (function(){
} }
/** /**
* * Updates the background elements to reflect the current
* slide.
*/ */
function updateBackground() { function updateBackground() {
// Update the classes of all backgrounds to match the
// states of their slides (past/present/future)
toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) { toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) {
backgroundh.className = ( h < indexh ? 'past' : h > indexh ? 'future' : 'present' ); backgroundh.className = ( h < indexh ? 'past' : h > indexh ? 'future' : 'present' );
@ -1479,6 +1483,11 @@ var Reveal = (function(){
} ); } );
// Allow the first background to apply without transition
setTimeout( function() {
dom.background.classList.remove( 'no-transition' );
}, 1 );
} }
/** /**

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long