Skip to content

Commit

Permalink
Disable backgroundTransition during autoAnimate
Browse files Browse the repository at this point in the history
  • Loading branch information
devkev committed Jan 5, 2023
1 parent 4fe3946 commit 837ea29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1093,11 +1093,13 @@ $controlsArrowAngleActive: 36deg;

.reveal .no-transition,
.reveal .no-transition *,
.reveal .slides.disable-slide-transitions section {
.reveal .slides.disable-slide-transitions section,
.reveal .backgrounds.disable-slide-transitions .slide-background {
transition: none !important;
}

.reveal .slides.disable-slide-transitions section {
.reveal .slides.disable-slide-transitions section,
.reveal .backgrounds.disable-slide-transitions .slide-background {
transform: none !important;
}

Expand Down
2 changes: 2 additions & 0 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ export default function( revealElement, options ) {

autoAnimateTransition = true;
dom.slides.classList.add( 'disable-slide-transitions' );
backgrounds.element.classList.add( 'disable-slide-transitions' );
}

transition = 'running';
Expand Down Expand Up @@ -1416,6 +1417,7 @@ export default function( revealElement, options ) {

setTimeout( () => {
dom.slides.classList.remove( 'disable-slide-transitions' );
backgrounds.element.classList.remove( 'disable-slide-transitions' );
}, 0 );

if( config.autoAnimate ) {
Expand Down

0 comments on commit 837ea29

Please sign in to comment.