diff --git a/Web/ServiceWorker.js b/Web/ServiceWorker.js index 7242fc8..54f2ced 100644 --- a/Web/ServiceWorker.js +++ b/Web/ServiceWorker.js @@ -1,4 +1,4 @@ -var cacheName = 'CandyFucker-v2'; +var cacheName = 'CandyFucker-v3'; var filesToCache = [ './index.html', './style.css', diff --git a/Web/code/GameLib.js b/Web/code/GameLib.js index 34eb05e..faf52e3 100644 --- a/Web/code/GameLib.js +++ b/Web/code/GameLib.js @@ -59,6 +59,7 @@ Mouse.prototype = { this.StartPosition.Y = position.Y; this.EndPosition.X = position.X; this.EndPosition.Y = position.Y; + event.preventDefault(); }, OnMouseMove: function (event) { if (this.RealDown === false) { @@ -72,6 +73,7 @@ Mouse.prototype = { this.Down = true; this.EndPosition.X = position.X; this.EndPosition.Y = position.Y; + event.preventDefault(); }, OnMouseUp: function (event) { var position = this.GetEventPoistion({ @@ -81,10 +83,12 @@ Mouse.prototype = { this.RealDown = false; this.EndPosition.X = position.X; this.EndPosition.Y = position.Y; + event.preventDefault(); }, OnMouseLeave: function () { this.RealDown = false; this.Down = false; + event.preventDefault(); }, OnTouchStart: function (event) { var position = this.GetEventPoistion({ @@ -97,6 +101,7 @@ Mouse.prototype = { this.StartPosition.Y = position.Y; this.EndPosition.X = position.X; this.EndPosition.Y = position.Y; + event.preventDefault(); }, OnTouchMove: function (event) { if (this.RealDown === false) { @@ -110,9 +115,11 @@ Mouse.prototype = { this.Down = true; this.EndPosition.X = position.X; this.EndPosition.Y = position.Y; + event.preventDefault(); }, OnTouchEnd: function () { this.RealDown = false; + event.preventDefault(); }, Update: function () { if (this.RealDown === false) { diff --git a/Web/style.css b/Web/style.css index cc56caf..07a8149 100644 --- a/Web/style.css +++ b/Web/style.css @@ -1,36 +1,42 @@ -html{ +html { height: 100%; } -body{ - background-color: rgb(20,20,20); + +body { + background-color: rgb(20, 20, 20); color: grey; font-family: Arial, sans-serif; margin: 0; padding: 0; text-align: center; height: 100%; + overscroll-behavior: contain; } -#divLogo{ - display:block; + +#divLogo { + display: block; height: auto; width: 100%; padding: 0; margin: 0; } -#divLogo img{ + +#divLogo img { max-width: 100%; height: auto; } -#divInfoDisplay{ - display:block; - height:20px; + +#divInfoDisplay { + display: block; + height: 20px; width: 100%; line-height: 20px; font-size: 15px; - color: rgb(220,220,220); + color: rgb(220, 220, 220); padding: 0; margin: 0; } + #divScreen { display: block; position: relative; @@ -39,12 +45,16 @@ body{ height: 70%; overflow: visible; } + #cnvScreen { display: block; position: absolute; margin: auto; - top: 0; left: 0; bottom: 0; right: 0; + top: 0; + left: 0; + bottom: 0; + right: 0; max-width: 100%; max-height: 100%; - box-shadow: 0 0 20px rgb(0,0,0); -} + box-shadow: 0 0 20px rgb(0, 0, 0); +} \ No newline at end of file