diff --git a/public_html/resources/js/Views.js b/public_html/resources/js/Views.js index 4af1988..5da1f2f 100644 --- a/public_html/resources/js/Views.js +++ b/public_html/resources/js/Views.js @@ -2,8 +2,6 @@ function Views(parser) { this.parser = parser; - this.screenWidth = window.innerWidth; - this.screenHeight = window.innerHeight; this.windowTag = document.getElementById("window"); this.textAuthorTag = document.getElementById("textAuthor"); @@ -127,7 +125,7 @@ Views.prototype.sprite = function (whoid, params, position, alias, effect) { } else { //if (this.useSpriteTransitions) img = new AnimatableImageView(this); //else img = new ImageView(this); - img = $('', {class: "sprite", style: "height: " + this.screenHeight + "px;" }); + img = $('', {class: "sprite", style: "height: " + window.innerHeight + "px;" }); this.spriteInContainer[key] = img; } var path = PathResolver.sprite(whoid, params); @@ -176,7 +174,7 @@ Views.prototype.hide = function (whoid, effect) { }; Views.prototype.setSpritePosition = function (img, position) { - var width = this.screenWidth; + var width = window.innerWidth; var imgWidth = img.width(); if (TextUtils.isEmpty(position) || position.equals("center")) { img.css("left", Math.floor(width / 2 - imgWidth / 2) + "px");