Skip to content

Commit

Permalink
Merge pull request #455 from softwaremagico/453-score-time-are-not-sh…
Browse files Browse the repository at this point in the history
…own-on-the-panel

Fixed score time pop-up
  • Loading branch information
softwaremagico committed May 27, 2024
2 parents 09c6255 + 85ca2a7 commit 3e509fd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/softwaremagico/KendoTournamentManager)](https://github.com/softwaremagico/KendoTournamentManager)
[![GitHub last commit](https://img.shields.io/github/last-commit/softwaremagico/KendoTournamentManager)](https://github.com/softwaremagico/KendoTournamentManager)
[![CircleCI](https://circleci.com/gh/softwaremagico/KendoTournamentManager.svg?style=shield)](https://circleci.com/gh/softwaremagico/KendoTournamentManager)
[![Time](https://img.shields.io/badge/development-623h-blueviolet.svg)]()
[![Time](https://img.shields.io/badge/development-624h-blueviolet.svg)]()

[![Powered by](https://img.shields.io/badge/powered%20by%20java-orange.svg?logo=OpenJDK&logoColor=white)]()
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=kendo-tournament-backend&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=kendo-tournament-backend)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
(focus)="clearCoordinates();"
(blur)="clearCoordinates();"
class="point" [ngClass]="{'hidden-point': scoreRepresentation === 'F'}" >
{{scoreRepresentation}}
<span class="point-value">{{scoreRepresentation}}</span>
<div *ngIf="this.timeRepresentation" [innerHTML]="tooltipText()"
[ngClass]="{
'left-border': onLeftBorder,
'center': !onRightBorder && !onLeftBorder,
'right-border': onRightBorder
}"
class="tooltiptext">
class="tooltip-popup">
<mat-icon>timer</mat-icon>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
font-weight: bold;
font-size: 130%;
flex-grow: 1;
height: 20px;
width: 20px;
position: relative;
}

.point .tooltiptext {
.point .tooltip-popup {
visibility: hidden;
width: 200px;
width: 120px;
min-height: 50px;
background-color: #555555;
color: #ffffff;
Expand All @@ -35,30 +38,29 @@

/* Position the tooltip text */
position: absolute;
z-index: 1;
z-index: 1000;
top: 125%;
left: 50%;
margin-left: -100px;

/* Fade in tooltip */
opacity: 0;
transition: opacity 0.3s;
}

.point .tooltiptext.left-border {
.point .tooltip-popup.left-border {
margin-left: -40px;
}

.point .tooltiptext.right-border {
.point .tooltip-popup.right-border {
margin-left: -260px;
}

.point .tooltiptext.center {
margin-left: -100px;
.tooltip-popup.center {
translate: -50%;
}

/* Tooltip arrow */
.point .tooltiptext::after {
.point .tooltip-popup::after {
content: "";
position: absolute;
top: -18%;
Expand All @@ -71,7 +73,7 @@


/* Show the tooltip text when you mouse over the tooltip container */
.point:hover .tooltiptext {
.point:hover .tooltip-popup {
visibility: visible;
opacity: 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,8 @@ export class ScoreComponent implements OnInit, OnChanges {
if (!this.timeRepresentation || this.timeRepresentation.length == 0) {
return "";
}
let tooltipText: string = '<b>' + this.getScore() + '</b><br>' +
'<div class="time-tooltip-container"><span class="material-icons time-tooltip">timer</span><span class="time-tooltip">' + this.timeRepresentation + '</span></div>';
return tooltipText;
return '<span class="tooltip-score"><b>' + this.getScore() + '</b></span><br>' +
'<div class="time-tooltip-container"><span class="material-icons time-tooltip">timer</span><span class="time-tooltip-text">' + this.timeRepresentation + '</span></div>';
}

updateCoordinates($event: MouseEvent): void {
Expand Down

0 comments on commit 3e509fd

Please sign in to comment.