From 9b2c740b9d0ece926ee5a1f62818e3178c089e27 Mon Sep 17 00:00:00 2001 From: Bui Date: Wed, 10 Oct 2018 22:51:07 +0100 Subject: [PATCH] prevent version link from being clicked during play on mobile --- public/src/css/main.css | 6 +++++- public/src/js/view.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/src/css/main.css b/public/src/css/main.css index f283965..8f81bdf 100644 --- a/public/src/css/main.css +++ b/public/src/css/main.css @@ -240,4 +240,8 @@ kbd{ color: #FFFFFF; text-decoration: none; cursor: default; -} \ No newline at end of file +} + +.version-hide{ + pointer-events: none; +} diff --git a/public/src/js/view.js b/public/src/js/view.js index 0151369..1377c0e 100644 --- a/public/src/js/view.js +++ b/public/src/js/view.js @@ -59,6 +59,7 @@ class View{ this.touchDrumDiv = document.getElementById("touch-drum") this.touchDrumImg = document.getElementById("touch-drum-img") this.gameDiv.classList.add("touch-visible") + document.getElementById("version").classList.add("version-hide") pageEvents.add(this.canvas.canvas, "touchstart", this.ontouch.bind(this)) @@ -954,6 +955,7 @@ class View{ pageEvents.remove(this.touchFullBtn, "click") pageEvents.remove(this.touchPauseBtn, "click") this.gameDiv.classList.remove("touch-visible") + document.getElementById("version").classList.remove("version-hide") delete this.touchDrumDiv delete this.touchDrumImg delete this.touchFullBtn