The following is happening (see gif)
mouseenter()
and mouseout()
Isn't there a way to have mouseout()
firing whenever an element disappears? Because logically, the mouse isn't hovering that element anymore then
Here is the code, changing the icons is done by replacing the fontawesome prefix.
<div (mouseover)="ratingEmojis.right='fas'" (mouseout)="ratingEmojis.right='far'" (click)="this.state.jumpToConfigStep(100)" class="iconButton">
<fa-icon style='pointer-events: none' [icon]="[ratingEmojis.right, 'frown-open']" size="6x" ></fa-icon>
</div>
I'm not sure what this.state.jumpToConfigStep(100)
does but you could do this:
<div (mouseover)="ratingEmojis.right='fas'" (mouseout)="ratingEmojis.right='far'" (click)="rightClicked()" class="iconButton">
<fa-icon style='pointer-events: none' [icon]="[ratingEmojis.right, 'frown-open']" size="6x" ></fa-icon>
</div>
rightClicked() {
this.ratingEmojis.right = 'frown-open';
this.state.jumpToConfigStep(100)
}
Though most of this looks like it could be achieved with css and :hover