diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-28 10:41:31 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-28 10:41:31 +0200 |
commit | 02725cf728488edc89b66229b8e634a87b1d8d20 (patch) | |
tree | 1c1179123923b60021ffcb6b659ffae747f9883f /js | |
parent | fcec8d058d981593b1d237d7760f42354ee7684a (diff) | |
download | fosdem-2018-presentation-02725cf728488edc89b66229b8e634a87b1d8d20.tar fosdem-2018-presentation-02725cf728488edc89b66229b8e634a87b1d8d20.tar.gz |
prefer scaling over zooming on mobile devices
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js index c6187ec..1c866b9 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -268,7 +268,7 @@ features.canvas = !!document.createElement( 'canvas' ).getContext; - isMobileDevice = navigator.userAgent.match( /(iphone|ipod|android)/gi ); + isMobileDevice = navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ); } @@ -1244,8 +1244,8 @@ scale = Math.max( scale, config.minScale ); scale = Math.min( scale, config.maxScale ); - // Prefer zooming in WebKit so that content remains crisp - if( /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { + // Prefer zooming in desktop WebKit so that content remains crisp + if( !isMobileDevice && /webkit/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) { dom.slides.style.zoom = scale; } // Apply scale transform as a fallback |