aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2015-08-03 12:24:38 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2015-08-03 12:24:38 +0200
commitde3e1daab43a0e126747660b9a62d14512b0f703 (patch)
tree85ffeafa7c52fbff5c65b4deb03c35ffe006b414 /js
parent25da01ce41fd8222fb9236e36f75d426ffe3c80f (diff)
downloadfosdem-2018-presentation-de3e1daab43a0e126747660b9a62d14512b0f703.tar
fosdem-2018-presentation-de3e1daab43a0e126747660b9a62d14512b0f703.tar.gz
only use zoom to scale presentations up, fixes shifts in text layout
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index a0120b4..738d8a9 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1530,13 +1530,20 @@
transformSlides( { layout: '' } );
}
else {
- // Prefer zooming in desktop Chrome so that content remains crisp
- if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
+ // Use zoom to scale up in desktop Chrome so that content
+ // remains crisp. We don't use zoom to scale down since that
+ // can lead to shifts in text layout/line breaks.
+ if( scale > 1 && !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
dom.slides.style.zoom = scale;
+ dom.slides.style.left = '';
+ dom.slides.style.top = '';
+ dom.slides.style.bottom = '';
+ dom.slides.style.right = '';
transformSlides( { layout: '' } );
}
// Apply scale transform as a fallback
else {
+ dom.slides.style.zoom = '';
dom.slides.style.left = '50%';
dom.slides.style.top = '50%';
dom.slides.style.bottom = 'auto';