From 32b93a5761694a74d78f3292b45938c864108310 Mon Sep 17 00:00:00 2001 From: Christian 'ketura' McCarty Date: Mon, 22 Apr 2024 19:44:59 -0500 Subject: [PATCH] Fixed pre-game panel showing in the distant background when reconnecting after the game starts --- .../src/main/web/js/gemp-022/gameUi.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js index 69159c713..3895279e4 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js @@ -1,6 +1,8 @@ var GempLotrGameUI = Class.extend({ padding: 5, + initialized: false, + pregamePanel: null, bottomPlayerId: null, @@ -471,6 +473,8 @@ var GempLotrGameUI = Class.extend({ $("body").unbind("mousemove", dragFunc); return that.dragStopCardFunction(event); }); + + this.initialized = true; }, @@ -1448,7 +1452,6 @@ var GempLotrGameUI = Class.extend({ }, participant: function (element) { - this.pregamePanel.hide(); var participantId = element.getAttribute("participantId"); @@ -1491,6 +1494,12 @@ var GempLotrGameUI = Class.extend({ }, preGameSetup: function (element) { + if(this.initialized) { + this.pregamePanel.hide(); + + return; + } + var summary = element.getAttribute("summary"); var allPlayerIds = element.getAttribute("allParticipantIds").split(","); var participantId = element.getAttribute("participantId"); @@ -1554,8 +1563,6 @@ var GempLotrGameUI = Class.extend({ leftContent.append("
" + notes + "
"); } - - this.pregamePanel.show(); },