From 76033492212323fcbcc3522edc588120a3092b72 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 9 Mar 2018 12:26:51 +0100 Subject: [PATCH] Update: CC - Touch Move (evwkow5289.js) 3 bytes modified --- evwkow5289.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/evwkow5289.js b/evwkow5289.js index a72560d..cddcbe2 100644 --- a/evwkow5289.js +++ b/evwkow5289.js @@ -7,8 +7,10 @@ if (!this.initialized) { this.dom = this.entityLoaded.dom; - this.x = window.innerWidth / 2; - this.y = window.innerHeight / 2; + var size = GameLib.Utils.GetWindowSize(); + + this.x = size.width / 2; + this.y = size.height / 2; this.initialized = true; } @@ -43,16 +45,16 @@ if (this.x < 0) { this.x = 0; } -if (this.x > window.innerWidth) { - this.x = window.innerWidth; +if (this.x > size.width) { + this.x = size.width; } if (this.y < 0) { this.y = 0; } -if (this.y > window.innerHeight) { - this.y = window.innerHeight; +if (this.y > size.height) { + this.y = size.height; } GameLib.Event.Emit(