Fix results not showing in Firefox

This commit is contained in:
LoveEevee 2018-10-01 13:02:28 +03:00
parent fb836d7e77
commit ab1835aa48
3 changed files with 11 additions and 6 deletions

View File

@ -132,7 +132,9 @@ class Controller{
this.view.displayScore(score, notPlayed) this.view.displayScore(score, notPlayed)
} }
songSelection(fadeIn){ songSelection(fadeIn){
this.clean() if(!fadeIn){
this.clean()
}
new SongSelect(false, fadeIn) new SongSelect(false, fadeIn)
} }
restartSong(){ restartSong(){

View File

@ -132,7 +132,7 @@ class Scoresheet{
var frameTop = winH / 2 - 720 / 2 var frameTop = winH / 2 - 720 / 2
var frameLeft = winW / 2 - 1280 / 2 var frameLeft = winW / 2 - 1280 / 2
var players = p2.results ? 2 : 1 var players = this.multiplayer && p2.results ? 2 : 1
var p2Offset = 298 var p2Offset = 298
var bgOffset = 0 var bgOffset = 0
@ -372,10 +372,12 @@ class Scoresheet{
552, 120, 688, 48 552, 120, 688, 48
) )
var gauge = results.gauge / 100 var gauge = results.gauge / 100
ctx.drawImage(assets.image["hp-bar-colour"], if(gauge > 0){
0, 0, 650 * gauge, 40, ctx.drawImage(assets.image["hp-bar-colour"],
557, 127, 635 * gauge, 37, 0, 0, 650 * gauge, 40,
) 557, 127, 635 * gauge, 37,
)
}
} }
ctx.restore() ctx.restore()
} }

View File

@ -820,6 +820,7 @@ class View{
if(this.controller.multiplayer === 2){ if(this.controller.multiplayer === 2){
this.canvas.canvas.parentNode.removeChild(this.canvas.canvas) this.canvas.canvas.parentNode.removeChild(this.canvas.canvas)
} }
this.cursor.parentNode.removeChild(this.cursor)
delete this.pauseMenu delete this.pauseMenu
delete this.cursor delete this.cursor
delete this.canvas delete this.canvas