Skip to content

Commit

Permalink
Merge pull request #1945 from asfadmin/andy/yoreley-slider
Browse files Browse the repository at this point in the history
Fix day slider getting stuck
  • Loading branch information
artisticlight authored Aug 14, 2024
2 parents 99b27e1 + fb6cac3 commit 6a7a3f1
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class SbasSlidersTwoComponent implements OnInit {
public temporal: number;
public perpendicular: number;
public daysRange: models.Range<number> = {start: 1, end: 48};
public lastRange: models.Range<number> = {start: 0, end: 0};
public daysValues$ = new Subject<number[]>();
public metersValues$ = new Subject<number[]>();
// public perpStart = 800;
Expand Down Expand Up @@ -104,12 +105,14 @@ export class SbasSlidersTwoComponent implements OnInit {
this.subs.add(
this.store$.select(filtersStore.getTemporalRange).subscribe(
temp => {
console.log('getTemporalRange:', temp);
this.daysRange = {start: temp.start, end: temp.end};
this.slider.set([temp.start, temp.end]);
// if (this.firstLoad) {
// this.slider.set([temp.start, temp.end]);
// this.firstLoad = false;
// }
if (this.lastRange.start !== this.daysRange.start || this.lastRange.end !== this.daysRange.end) {
console.log('getTemporalRange:', this.daysRange);
this.lastRange.start = this.daysRange.start;
this.lastRange.end = this.daysRange.end;
this.slider.set([temp.start, temp.end]);
}
}
)
);
Expand Down

0 comments on commit 6a7a3f1

Please sign in to comment.