|
@@ -47,14 +47,15 @@
|
|
|
</script>
|
|
|
<meta name="viewport" id="viewportMeta">
|
|
|
<script>
|
|
|
- var initViewport = function (height) {
|
|
|
+ var initViewport = function (height,width) {
|
|
|
var metaEl = document.querySelector("#viewportMeta");
|
|
|
- var content = "height=" + height + ",width=device-width,initial-scale=1.0,user-scalable=no";
|
|
|
+ var content = "height=" + height + ",width=" + width + ",initial-scale=1.0,user-scalable=no";
|
|
|
metaEl.setAttribute('name', 'viewport');
|
|
|
metaEl.setAttribute('content', content);
|
|
|
}
|
|
|
- var realHeight = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight
|
|
|
- initViewport(realHeight);
|
|
|
+ var realHeight = window.innerHeight > window.innerWidth ? window.innerWidth : window.innerHeight
|
|
|
+ var realWidth = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth
|
|
|
+ initViewport(realHeight,realWidth);
|
|
|
</script>
|
|
|
</head>
|
|
|
|