Permalink
Browse files

fullscreen 기본 코드 적용

  • Loading branch information...
chorr committed Mar 13, 2012
1 parent 0af988d commit 749fcf49df9e8e52e41a95bcb077d220c8bc2cab
Showing with 11 additions and 0 deletions.
  1. +1 −0 app.html
  2. +10 −0 static/dot.app.js
View
@@ -14,6 +14,7 @@
<script src="./static/dot.canvas.js" type="text/javascript"></script>
<script src="./static/dot.ui.js" type="text/javascript"></script>
<style type="text/css">
+ body {min-height:800px;}
#app {-webkit-tap-highlight-color:rgba(0,0,0,0);}
.stage {width:320px;height:320px;}
View
@@ -10,6 +10,7 @@ dot.App = {
this.view = new this._view({ model: this._model });
Backbone.history.start();
+ dot.Util.fullscreen();
},
// url 컨트롤 라우터
@@ -138,6 +139,15 @@ dot.Util = {
cssPrefix: function() {
var b = $.browser;
return (b["mozilla"] ? "moz" : b["webkit"] ? "webkit" : b["opera"] ? "opera" : "").replace(/(.*)/, "-$1-");
+ },
+
+ fullscreen: function() {
+ setTimeout(window.scrollTo, 100, 0, 1);
+ setTimeout(function() {
+ if ($("body").height() > window.innerHeight) {
+ $("body").css("min-height", window.innerHeight);
+ }
+ }, 300);
}
};

0 comments on commit 749fcf4

Please sign in to comment.