Skip to content

Commit

Permalink
fix: misaligned title (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Oct 12, 2023
1 parent fb1cfcc commit 3e91a5b
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 158 deletions.
235 changes: 119 additions & 116 deletions Client/package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
},
"private": false,
"dependencies": {
"@angular/animations": "^16.2.8",
"@angular/cdk": "^16.2.7",
"@angular/common": "^16.2.8",
"@angular/compiler": "^16.2.8",
"@angular/core": "^16.2.8",
"@angular/forms": "^16.2.8",
"@angular/material": "^16.2.7",
"@angular/platform-browser": "^16.2.8",
"@angular/platform-browser-dynamic": "^16.2.8",
"@angular/router": "^16.2.8",
"@angular/animations": "^16.2.9",
"@angular/cdk": "^16.2.8",
"@angular/common": "^16.2.9",
"@angular/compiler": "^16.2.9",
"@angular/core": "^16.2.9",
"@angular/forms": "^16.2.9",
"@angular/material": "^16.2.8",
"@angular/platform-browser": "^16.2.9",
"@angular/platform-browser-dynamic": "^16.2.9",
"@angular/router": "^16.2.9",
"@ctrl/tinycolor": "^3.6.0",
"@ng-matero/extensions": "^16.1.1",
"chart.js": "^4.4.0",
Expand All @@ -34,20 +34,20 @@
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.5",
"@angular-devkit/build-angular": "^16.2.6",
"@angular-eslint/builder": "~16.2.0",
"@angular-eslint/eslint-plugin": "~16.2.0",
"@angular-eslint/eslint-plugin-template": "~16.2.0",
"@angular-eslint/schematics": "~16.2.0",
"@angular-eslint/template-parser": "~16.2.0",
"@angular/cli": "^16.2.5",
"@angular/compiler-cli": "^16.2.8",
"@angular/language-service": "^16.2.8",
"@angular/cli": "^16.2.6",
"@angular/compiler-cli": "^16.2.9",
"@angular/language-service": "^16.2.9",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"eslint": "^8.51.0",
"ts-node": "~10.9.1",
"typescript": "~5.1.3"
"typescript": "~5.1.6"
}
}
2 changes: 1 addition & 1 deletion Client/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.button-container {

position: absolute;
top: -50px;
top: -56px;
right: 8px;
height: 100%;
min-height: 100vh;
Expand Down
2 changes: 0 additions & 2 deletions Client/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export class AppComponent implements OnInit {
// SETTINGS DIALOG
openSettingsDialog(): void {
this.settingsDialog.open(SettingsComponent, {
minWidth: "300px",
maxHeight: "80vh",
autoFocus: "dialog"
});
}
Expand Down
45 changes: 33 additions & 12 deletions Client/src/app/chart/chart.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@
max-width: 1024px;
margin: auto;

height: 55vh;
// height: 300px; // for doc site only
aspect-ratio: 2.5;

@media (max-height: 700px){
height: 40vh;
// tablet-lg
@media (max-width: 880px) {
aspect-ratio: 2;
}

@media (max-height: 400px){
height: calc(100vh - 64px); // full-screen (with toolbar)
// mobile
@media (max-width: 600px) {
aspect-ratio: 5/4;
}

// landscape, full screen
@media (max-height: 400px) and (orientation: landscape) {
aspect-ratio: unset;
height: calc(100vh);
}
}

Expand All @@ -26,15 +33,29 @@
padding: 0 8px;
max-width: 1024px;
margin: auto;
margin-top: 0.5rem;
margin-top: 0;

aspect-ratio: 10;

// tablet-lg
@media (max-width: 880px) {
aspect-ratio: 8;
}

height: 15vh;
// tablet-lg, landscape
@media (max-width: 880px) and (orientation: landscape){
aspect-ratio: unset;
height: 25vh; }

@media (max-height: 800px){
height: 20vh;
// mobile, landscape
@media (max-height: 600px) and (orientation: landscape) {
aspect-ratio: unset;
height: 33.33vh;
}

@media (max-height: 400px){
height: 30vh;
// mobile
@media (max-height: 400px) {
aspect-ratio: unset;
height: 50vh;
}
}
2 changes: 1 addition & 1 deletion Client/src/app/picker/pick-config.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h2 mat-dialog-title>{{listing.name}}</h2>
<h2 mat-dialog-title matTooltip="{{listing.name}}" class="noselect">{{listing.name}}</h2>

<!-- form content -->
<form #paramForm="ngForm" name="paramForm">
Expand Down
8 changes: 6 additions & 2 deletions Client/src/app/picker/pick-config.component.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// @import "src/app/styles-theme";

.mat-mdc-dialog-title {
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

mat-dialog-content {
max-height: calc(100vh - 132.8px) !important;
}

h2 {
font-size: 1.3em;
Expand Down
1 change: 0 additions & 1 deletion Client/src/app/picker/settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class SettingsComponent {

// open settings for indicator to add
this.picker.open(PickConfigComponent, {
minWidth: '300px',
autoFocus: "dialog",
data: listing
});
Expand Down
6 changes: 3 additions & 3 deletions Client/src/app/services/chart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ export class ChartService {

const labelColor = this.ts.isDarkTheme ? '#757575' : '#212121';
const annotation: AnnotationOptions =
this.commonAnnotation(selection.label, labelColor, xPos, yPos, -2, 1);
this.commonAnnotation(selection.label, labelColor, xPos, yPos, 0, 1);
selection.chart.options.plugins.annotation.annotations = { annotation };
selection.chart.update();

Expand All @@ -526,14 +526,14 @@ export class ChartService {

const xPos: ScaleValue = this.chartOverlay.scales["xAxis"].min;
const yPos: ScaleValue = this.chartOverlay.scales["yAxis"].max;
let adjY: number = 0;
let adjY: number = 10;

this.chartOverlay.options.plugins.annotation.annotations =
this.selections
.filter(x => x.chartType == 'overlay')
.map((selection: IndicatorSelection, index: number) => {
const annotation: AnnotationOptions =
this.commonAnnotation(selection.label, selection.results[0].color, xPos, yPos, -2, adjY);
this.commonAnnotation(selection.label, selection.results[0].color, xPos, yPos, 0, adjY);
annotation.id = "legend" + (index + 1).toString();
adjY += 15;
return annotation;
Expand Down
10 changes: 6 additions & 4 deletions Client/src/styles/_themed-parts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
// ANGULAR MATERIAL OVERRIDES

// TOOLBAR
.main-toolbar {
.main-toolbar,
.mat-toolbar-single-row {

background-color: transparent;

Expand All @@ -28,10 +29,9 @@
max-width: $maxwidth;
margin-left: auto;
margin-right: auto;
padding: 0 9px;
padding: 0 8px;

a {
font-family: "Google Sans", Roboto, Arial, Helvetica, sans-serif;
text-decoration: none;
color: inherit;

Expand All @@ -44,8 +44,10 @@

// MAIN FOOTER
.footer {
padding: 1rem 9px;
padding: 1rem 8px;
margin-top: 3rem;
margin-bottom: 3rem;

text-align: center;
color: mat.get-color-from-palette($accent, 600);

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you want to host on your local computer and review the source code, follow th

### Prerequisites

- [Git](https://git-scm.com/) and [Node.js](https://nodejs.org/) v14.x or later
- [Git](https://git-scm.com/) and [Node.js](https://nodejs.org/) v18.x or later
- [Visual Studio](http://visualstudio.com)

### Steps
Expand Down

0 comments on commit 3e91a5b

Please sign in to comment.