Skip to content

Commit

Permalink
Language tooltip (#18)
Browse files Browse the repository at this point in the history
Added language tooltip to each tile
  • Loading branch information
sergeychernyshev authored Aug 7, 2024
1 parent 278142c commit 6059b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitterra",
"version": "1.1.3",
"version": "1.1.4",
"description": "A git-based game running in CI/CD and played by coding",
"main": "src/generateMap.js",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ export const generateMapHTML = function (gameConfig, clusters) {
: "";

return `
<use href="#tile${tile.sprite.tileNumber}"
<use href="#tile${tile.sprite.tileNumber}"
style="transform: translate(
${Math.floor(tile.isoX)}px,
${Math.floor(tile.isoY)}px
)"
${languageClassAttribute}
/>
>
<title>${tile.language}</title>
</use>
`;
});

Expand Down

0 comments on commit 6059b28

Please sign in to comment.