From 05608e341d7518bb1ec199bc8b23700c5b87ba11 Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 26 Aug 2018 17:40:59 +0100 Subject: [PATCH] fix firefox bug --- README.md | 6 ++---- src/js/view.js | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7ee0e0c..f6b5747 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Taiko no Tatsujin Web A web version of Taiko no Tatsujin -Currently uploaded to -https://taiko.bui.pm +Running instance: https://taiko.bui.pm -Still in developement -Only works with Chrome. +Still in developement. Works best with Chrome. diff --git a/src/js/view.js b/src/js/view.js index 125cd3a..8eff24a 100644 --- a/src/js/view.js +++ b/src/js/view.js @@ -191,7 +191,8 @@ function View(controller, bg, title, diff){ var barColour = document.getElementById('hp-bar-colour'); _ctx.drawImage(barBG, _HPBarX, _HPBarY, _HPBarW, _HPBarH); - _ctx.drawImage(barColour, 0, 0, _HPBarColWImage, 40, _HPbarColX, _HPbarColY, _HPBarColWCanvas, _HPBarColH); + console.log(_HPBarColWImage); + _ctx.drawImage(barColour, 0, 0, Math.max(1, Math.floor(_HPBarColWImage)), 40, _HPbarColX, _HPbarColY, _HPBarColWCanvas, _HPBarColH); }