aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2019-01-31 20:13:32 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2019-01-31 20:13:32 +0100
commit812b802c1cf896f2af44cd87eef63be4ecf98842 (patch)
tree70e1a8e6a7558f62fa3d686b588328e223528922 /js
parent9c1615fff1b9a31e4ea5bd0e33b585ee9a888b39 (diff)
downloadperl-software-in-gnu-guix-812b802c1cf896f2af44cd87eef63be4ecf98842.tar
perl-software-in-gnu-guix-812b802c1cf896f2af44cd87eef63be4ecf98842.tar.gz
resize event tweaks for #2300
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 8d150d8..e146752 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2097,6 +2097,8 @@
var size = getComputedSlideSize();
+ var oldScale = scale;
+
// Layout the contents of the slides
layoutSlideContents( config.width, config.height );
@@ -2104,7 +2106,6 @@
dom.slides.style.height = size.height + 'px';
// Determine scale of content to fit within available space
- var oldscale =scale;
scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height );
// Respect max/min scale settings
@@ -2170,9 +2171,9 @@
}
- if( oldscale!==scale ){
+ if( oldScale !== scale ) {
dispatchEvent( 'resize', {
- 'oldscale': oldscale,
+ 'oldScale': oldScale,
'scale': scale,
'size': size
} );