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"); var meta = $("meta[name='viewport']") || document.createElement("meta");
// hardcoding these values looks pretty bad, as they kind of depend on the content // hardcoding these values looks pretty bad, as they kind of depend on the content
// so they should be at least configurable // 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) { if (meta.parentNode != document.head) {
meta.name = 'viewport'; meta.name = 'viewport';
document.head.appendChild(meta); document.head.appendChild(meta);
@@ -315,6 +315,10 @@
goto( getElementFromUrl() ); goto( getElementFromUrl() );
}, false); }, false);
window.addEventListener("orientationchange", function () {
window.scrollTo(0, 0);
}, false);
// START // START
// by selecting step defined in url or first step of the presentation // by selecting step defined in url or first step of the presentation
goto(getElementFromUrl() || steps[0]); goto(getElementFromUrl() || steps[0]);