diff options
author | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-02-16 11:05:56 +0100 |
---|---|---|
committer | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-02-16 11:05:56 +0100 |
commit | 957599ab20ee112462766578340b134613b1a21b (patch) | |
tree | 608e7676f7d1c121b51676044803f64c89002a7b | |
parent | a2f4337ec2004116b46892482de0149608d1e773 (diff) | |
download | impress.js-957599ab20ee112462766578340b134613b1a21b.tar.gz |
scale fixes for iPad
-rw-r--r-- | js/impress.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/impress.js b/js/impress.js index e889a74..2782c06 100644 --- a/js/impress.js +++ b/js/impress.js @@ -128,7 +128,7 @@ var meta = $("meta[name='viewport']") || document.createElement("meta"); // hardcoding these values looks pretty bad, as they kind of depend on the content // so they should be at least configurable - meta.content = "width=1024, initial-scale=0.75, user-scalable=no"; + meta.content = "width=1024, initial-scale=0.75, minimum-scale=0.75, maximum-scale=0.75, user-scalable=no"; if (meta.parentNode != document.head) { meta.name = 'viewport'; document.head.appendChild(meta); @@ -315,6 +315,10 @@ goto( getElementFromUrl() ); }, false); + window.addEventListener("orientationchange", function () { + window.scrollTo(0, 0); + }, false); + // START // by selecting step defined in url or first step of the presentation goto(getElementFromUrl() || steps[0]); |