Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed score time pop-up #455

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading