Skip to content

Commit

Permalink
fix: add tooltip to jersey in player panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliboy50 committed Sep 6, 2022
1 parent 5c528bc commit 27c280d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified img/jersey_player_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions velonimo.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,12 @@ function (dojo, declare) {
moveJerseyToCurrentWinner: function (previousJerseyWearerId) {
const wearJersey = (playerId) => {
dojo.addClass(`player-table-${playerId}`, DOM_CLASS_PLAYER_IS_WEARING_JERSEY);
dojo.place(`<div class="${DOM_CLASS_JERSEY_IN_PLAYER_PANEL}"></div>`, `player_board_${playerId}`);
dojo.place(`<div id="player-panel-${playerId}-jersey" class="${DOM_CLASS_JERSEY_IN_PLAYER_PANEL}"></div>`, `player_board_${playerId}`);
this.addTooltip(`player-panel-${playerId}-jersey`, _('Current leader of the game'), '');
};
const removeJersey = (playerId) => {
dojo.removeClass(`player-table-${playerId}`, DOM_CLASS_PLAYER_IS_WEARING_JERSEY);
dojo.query(`#player_board_${playerId} .${DOM_CLASS_JERSEY_IN_PLAYER_PANEL}`).forEach(this.fadeOutAndDestroy);
this.fadeOutAndDestroy(`player-panel-${playerId}-jersey`);
};

Object.entries(this.players).forEach((entry) => {
Expand Down

0 comments on commit 27c280d

Please sign in to comment.