Skip to content

Commit

Permalink
fix: #32 title disappear when clicking start btn
Browse files Browse the repository at this point in the history
  • Loading branch information
es-rene99 committed Jul 19, 2021
1 parent 506f13f commit 9972d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Contains the constant uiElements, TODO still need to refactor
*/
const predefinedUIElements = {
titleScreen: document.getElementById('title-screen'),
gameStartBtn: document.getElementById('game__start-btn'),
gameTimer: document.getElementById('game__timer'),
gameWrapper: document.getElementById('game-wrapper'),
Expand Down Expand Up @@ -278,9 +279,9 @@ const uiHandler = {
activateEventListeners() {
predefinedUIElements.gameStartBtn.onclick = () => {
timer.startTimer();
this.toggleHiddenElement(predefinedUIElements.gameStartBtn);
this.toggleHiddenElement(predefinedUIElements.gameTimer);
this.toggleHiddenElement(predefinedUIElements.gameWrapper);
this.toggleHiddenElement(predefinedUIElements.titleScreen);
displayProblem();
askProblem();
};
Expand Down

0 comments on commit 9972d2c

Please sign in to comment.