scale fixes for iPad

This commit is contained in:
Bartek Szopka
2012-02-16 11:05:56 +01:00
parent a2f4337ec2
commit 957599ab20

View File

@@ -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]);