Skip to content

Commit

Permalink
fix overview rendering issues in latest chrome hakimel#1649
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel authored and Tobias committed Feb 22, 2018
1 parent 7f150ad commit ce2f4a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
6 changes: 2 additions & 4 deletions css/reveal.css
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ body {
visibility: visible;
outline: 10px solid rgba(150, 150, 150, 0.1);
outline-offset: 10px; }
.reveal.overview .backgrounds .slide-background.stack {
overflow: visible; }

.reveal.overview .slides section,
.reveal.overview-deactivating .slides section {
Expand All @@ -1070,10 +1072,6 @@ body {
-webkit-transition: none;
transition: none; }

.reveal.overview-animated .slides {
-webkit-transition: -webkit-transform 0.4s ease;
transition: transform 0.4s ease; }

/*********************************************
* RTL SUPPORT
*********************************************/
Expand Down
8 changes: 4 additions & 4 deletions css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,10 @@ body {
outline: 10px solid rgba(150,150,150,0.1);
outline-offset: 10px;
}

.backgrounds .slide-background.stack {
overflow: visible;
}
}

// Disable transitions transitions while we're activating
Expand All @@ -1115,10 +1119,6 @@ body {
transition: none;
}

.reveal.overview-animated .slides {
transition: transform 0.4s ease;
}


/*********************************************
* RTL SUPPORT
Expand Down
11 changes: 9 additions & 2 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,10 @@
updateProgress();
updateParallax();

if( isOverview() ) {
updateOverview();
}

}

}
Expand Down Expand Up @@ -1976,11 +1980,14 @@
*/
function updateOverview() {

var vmin = Math.min( window.innerWidth, window.innerHeight );
var scale = Math.max( vmin / 5, 150 ) / vmin;

transformSlides( {
overview: [
'scale('+ scale +')',
'translateX('+ ( -indexh * overviewSlideWidth ) +'px)',
'translateY('+ ( -indexv * overviewSlideHeight ) +'px)',
'translateZ('+ ( window.innerWidth < 400 ? -1000 : -2500 ) +'px)'
'translateY('+ ( -indexv * overviewSlideHeight ) +'px)'
].join( ' ' )
} );

Expand Down

0 comments on commit ce2f4a1

Please sign in to comment.