scale presentations on ipad instead of zoom

This commit is contained in:
Hakim El Hattab 2013-02-11 12:09:14 -05:00
parent 24c493fb83
commit 7ee4e0ba66
2 changed files with 62 additions and 58 deletions

View file

@ -552,6 +552,8 @@ var Reveal = (function(){
*/ */
function layout() { function layout() {
if( dom.wrapper ) {
// Available space to scale within // Available space to scale within
var availableWidth = dom.wrapper.offsetWidth, var availableWidth = dom.wrapper.offsetWidth,
availableHeight = dom.wrapper.offsetHeight; availableHeight = dom.wrapper.offsetHeight;
@ -586,7 +588,7 @@ var Reveal = (function(){
// Prefer applying scale via zoom since Chrome blurs scaled content // Prefer applying scale via zoom since Chrome blurs scaled content
// with nested transforms // with nested transforms
if( typeof dom.slides.style.zoom !== 'undefined' && !navigator.userAgent.match( /(iphone|ipod|android)/gi ) ) { if( typeof dom.slides.style.zoom !== 'undefined' && !navigator.userAgent.match( /(iphone|ipod|ipad|android)/gi ) ) {
dom.slides.style.zoom = scale; dom.slides.style.zoom = scale;
} }
// Apply scale transform as a fallback // Apply scale transform as a fallback
@ -630,6 +632,8 @@ var Reveal = (function(){
} }
}
/** /**
* Stores the vertical index of a stack so that the same * Stores the vertical index of a stack so that the same
* vertical slide can be selected when navigating to and * vertical slide can be selected when navigating to and

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long