Skip to content

Commit

Permalink
fix issue where background of a future vertical slide is briefly visi…
Browse files Browse the repository at this point in the history
…ble ahead of time #3520
  • Loading branch information
hakimel committed Nov 9, 2023
1 parent 1168056 commit 1e1e228
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions js/controllers/backgrounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,12 @@ export default class Backgrounds {

backgroundv.classList.remove( 'past', 'present', 'future' );

if( v < indices.v ) {
const indexv = typeof indices.v === 'number' ? indices.v : 0;

if( v < indexv ) {
backgroundv.classList.add( 'past' );
}
else if ( v > indices.v ) {
else if ( v > indexv ) {
backgroundv.classList.add( 'future' );
}
else {
Expand Down

0 comments on commit 1e1e228

Please sign in to comment.