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

Slider now is recreated on refresh for prior series #2009

Merged
merged 2 commits into from
Nov 13, 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
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</div>
</div>

<div class="fx-empty list-button-group">
<div *ngIf="searchType !== SearchTypes.DISPLACEMENT" class="fx-empty list-button-group">
<div class="fx-row-center button-group-label">
<label>{{ 'ZOOM' | translate }}</label>
</div>
Expand All @@ -102,7 +102,8 @@
</div>
</div>

<div class="fx-empty list-button-group" *ngIf="searchType !== SearchTypes.SARVIEWS_EVENTS">
<div class="fx-empty list-button-group"
*ngIf="searchType !== SearchTypes.SARVIEWS_EVENTS && searchType !== SearchTypes.DISPLACEMENT ">
<div class="fx-row-center button-group-label">
<label>{{ 'QUEUE' | translate }}</label>
</div>
Expand Down Expand Up @@ -387,7 +388,7 @@
{{'SELECTED_EVENT_PRODUCTS' | translate }} ({{pinnedEventIDs.length}} {{ 'FILES' | translate}})
</button>
</div>
</mat-menu>
</mat-menu>

<ng-container *ngIf="searchType === SearchTypes.BASELINE">
<div class="header-row-right" *ngIf="breakpoint > breakpoints.MOBILE">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<div class="ts-button-group-filler ts-button-group"></div>

<div class="ts-button-group-filler ts-button-group"></div>
<div class='ts-button-group'>
<div class='ts-button-group' style="visibility: hidden;">
<div class="button-group-label">
<label>{{ 'FILTERS' | translate }}</label>
</div>
Expand All @@ -134,8 +134,6 @@
<span class="material-symbols-outlined">
filter_alt
</span>
<!-- <mat-icon>filter_alt</mat-icon>-->
<!-- {{ 'DISPLACEMENT_FILTERS' | translate }}<mat-icon class="more-horiz">more_horiz</mat-icon>-->
</mat-button-toggle>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,13 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
return this.wktService.wktToFeature(value, 'EPSG:4326');
})
previous_points?.forEach((point, idx) => {
let allPointsData = [];
this.pointHistoryService.addPoint(point.getGeometry(), idx + 1);
this.netcdfService.getTimeSeries(point.getGeometry()).pipe(first()).subscribe()
this.netcdfService.getTimeSeries(point.getGeometry()).pipe(first()).subscribe( data => {
allPointsData.push(data);
// this.chartData.next(allPointsData);
this.maxRange = this.temporalRange = this.getMaxRange(allPointsData);
})
});
}
}
Expand Down Expand Up @@ -236,6 +241,7 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
public toggleAllSeries(checked: boolean) {
this.store$.dispatch(chartStore.setAllTimeseriesChecked({checked}))
}

public getMaxRange(allSeries: PointSeries[]) {
let minDate = null;
let maxDate = null;
Expand All @@ -255,15 +261,15 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
return dateRange;
}


public updateSeries(checked: boolean, index?: number) {
const wkt = this.chartStates[index]?.wkt

this.store$.dispatch(chartStore.setTimeseriesChecked({wkt, checked}))
}

public deletePoint(index: number) {
this.pointHistoryService.removePoint(index);
}

ngOnDestroy() {
this.pointHistoryService.clearPoints();
this.subs.unsubscribe();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Contenedor principal del slider */
.displacement-slider {
margin: 20px auto; /* Centra el slider horizontalmente */
display: block;
margin: 10px 20px 20px 45px; /* Centra el slider horizontalmente */
width: 100%; /* Ocupa todo el ancho disponible */
max-width: 95%; /* Opcional: Limita el ancho máximo para que no se extienda demasiado */
box-sizing: border-box;
Expand Down
4 changes: 4 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ ul {
font-size: 13px;
top: 17px;
}

.noUi-tooltip {
font-size: 14px;
}
}

.tick > line {
Expand Down
Loading