Advise needed on Tooltips
Posted: 13 May 2021, 11:25
Hello.
I managed to add tooltip for my card game (Riftforce).
Actually it is only a bigger image of the card but I plan to improve it with translation of the description on it.
But, I am facing strange behaviour.
First here is my code.
In tpl :
In css :
In JS :
What is happening :
Do you have any clue/explanation for these behaviors ?
I managed to add tooltip for my card game (Riftforce).
Actually it is only a bigger image of the card but I plan to improve it with translation of the description on it.
But, I am facing strange behaviour.
First here is my code.
In tpl :
Code: Select all
var jstpl_guild_tooltip = '<div class="card-guild card-tooltip guild_${guildName}"></div>';Code: Select all
.card-guild {
background-image: url('img/GuildSummoners.png');
background-repeat: no-repeat;
display: inline-block;
background-size: 1100% 100%;
position: absolute;
justify-self: center;
}
.card-tooltip {
width:320px;
height:447px;
border-radius: 18px;
}
.guild_fire{background-position: 0% 0%;}Code: Select all
this.addTooltipHtml( 'guild_' + guildId, this.format_block('jstpl_guild_tooltip', {
'guildName' : guildName.toLowerCase(),
}));- A strange "graphic artefact" is appearing in the upper left corner https://imgur.com/a/kw6qCm5
- Sometimes the tooltip does not appear and the card is "hover-blinking" with this CSS class (the card have it too, by design). When this happens, I cannot clic on card to select it (and trigger an action)
Code: Select all
.card-possible-selection {
cursor: pointer;
}
.card-possible-selection:hover {
transform: scale(1.1);
z-index: 100;
}