aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMario Wolff <mario.wolff@in.sachen.it>2019-01-15 13:13:19 +0100
committerMario Wolff <mario.wolff@in.sachen.it>2019-01-15 13:13:19 +0100
commitabee356e42bd27a06db3f1308fd7b751de646102 (patch)
tree201ad123a98d3382db73b5628973e63183e9f18f /js
parent0b3e7839ebf4ed8b6c180aca0abafa28c67aee6d (diff)
downloadperl-software-in-gnu-guix-abee356e42bd27a06db3f1308fd7b751de646102.tar
perl-software-in-gnu-guix-abee356e42bd27a06db3f1308fd7b751de646102.tar.gz
emmit resize event if scale changed
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 3c31b97..b291bc7 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1971,6 +1971,7 @@
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
@@ -2036,6 +2037,13 @@
}
+ if( oldscale!==scale ){
+ dispatchEvent( 'resize', {
+ 'oldscale': oldscale,
+ 'scale': scale,
+ 'size': size
+ } );
+ }
}
updateProgress();