From 1cee8998a0e423265d7e99feb6a74d627fc306ca Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 17 Feb 2017 10:50:52 +0100 Subject: fix overview rendering issues in latest chrome #1649 --- js/reveal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index d31d591..5325beb 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1797,6 +1797,10 @@ updateProgress(); updateParallax(); + if( isOverview() ) { + updateOverview(); + } + } } @@ -2012,11 +2016,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( ' ' ) } ); -- cgit v1.2.3