Skip to content
Snippets Groups Projects
Commit e3f6e42c authored by zdenko.vuk@ijs.si's avatar zdenko.vuk@ijs.si
Browse files

This is a combination of 5 commits.

works but not for values that go in opposite direction e.g. capacity

small css update

removed unneeded div

small css update

tiny css update
parent b4a19524
Branches
No related tags found
No related merge requests found
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
</nb-card-footer> </nb-card-footer>
</nb-card> </nb-card>
</ng-template> </ng-template>
</div>
<div id="grayscaleInput"> <div id="grayscaleInput">
<input <input
type="range" type="range"
...@@ -64,9 +63,9 @@ ...@@ -64,9 +63,9 @@
(change)="grayscaleChange()" (change)="grayscaleChange()"
/> />
</div> </div>
</div>
<div id="inputsLegendContainer"> <div id="inputsLegendContainer">
<form [formGroup]="newBrinkValues" (ngSubmit)="onApplyNewValuesSubmit()"> <form [formGroup]="newBrinkValues" (ngSubmit)="onApplyNewValuesSubmit()">
<section>
<div> <div>
<div> <div>
<label for="">1st color, up to</label> <label for="">1st color, up to</label>
...@@ -128,11 +127,15 @@ ...@@ -128,11 +127,15 @@
</div> </div>
</div> </div>
<div> <div>
<button nbButton status="primary" type="submit"> <button
nbButton
status="primary"
type="submit"
[disabled]="!newBrinkValues.dirty"
>
Apply new values Apply new values
</button> </button>
</div> </div>
</section>
</form> </form>
</div> </div>
</nb-card-body> </nb-card-body>
......
...@@ -44,13 +44,11 @@ ...@@ -44,13 +44,11 @@
} }
#inputsLegendContainer { #inputsLegendContainer {
padding: 10px; padding: 10px;
section { form {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: 10px;
}
div:nth-of-type(6) label { div:nth-of-type(6) label {
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -61,14 +59,18 @@ ...@@ -61,14 +59,18 @@
border-radius: 0.25rem; border-radius: 0.25rem;
text-align: right; text-align: right;
font-weight: bold; font-weight: bold;
background: #fff; padding: 3px 7px;
padding: 2px 5px;
} }
input { input {
margin: 2px 5px; margin-bottom: 2px;
margin-left: 5px;
height: 1rem; height: 1rem;
width: 10rem; width: 10rem;
} }
div:nth-child(2) button {
margin-left: 8px;
}
}
} }
} }
nb-radio { nb-radio {
......
...@@ -58,14 +58,14 @@ export class ResultsMapComponent implements OnChanges { ...@@ -58,14 +58,14 @@ export class ResultsMapComponent implements OnChanges {
this.grayscaleChange(); this.grayscaleChange();
const legendLabels = document.querySelectorAll( const legendLabels = document.querySelectorAll(
"#inputsLegendContainer section > div > div > label" "#inputsLegendContainer > form > div > div > label"
); );
for (let i = 0; i < legendLabels.length; i++) { for (let i = 0; i < legendLabels.length; i++) {
(legendLabels[i] as HTMLElement).style.backgroundColor = (legendLabels[i] as HTMLElement).style.backgroundColor =
MapColors.colorsAll[legendLabels.length - i - 1]; MapColors.colorsAll[legendLabels.length - i - 1];
} }
const inputsLegend = document.querySelectorAll( const inputsLegend = document.querySelectorAll(
"#inputsLegendContainer section > div > div > input" "#inputsLegendContainer > form > div > div > input"
); );
for (let i = 0; i < inputsLegend.length; i++) { for (let i = 0; i < inputsLegend.length; i++) {
(inputsLegend[i] as HTMLElement).style.backgroundColor = (inputsLegend[i] as HTMLElement).style.backgroundColor =
...@@ -223,6 +223,8 @@ export class ResultsMapComponent implements OnChanges { ...@@ -223,6 +223,8 @@ export class ResultsMapComponent implements OnChanges {
this.resetLayersAndButton(); this.resetLayersAndButton();
this.selectedGeojson = undefined; this.selectedGeojson = undefined;
// when the user will newly click on things, new geojsons will be created
this.newBrinkValuesApplied = true; this.newBrinkValuesApplied = true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment