diff --git a/src/app/components/results-menu/sbas-results-menu/sbas-sliders-two/sbas-sliders-two.component.ts b/src/app/components/results-menu/sbas-results-menu/sbas-sliders-two/sbas-sliders-two.component.ts index f453868c5..9c346c9ec 100644 --- a/src/app/components/results-menu/sbas-results-menu/sbas-sliders-two/sbas-sliders-two.component.ts +++ b/src/app/components/results-menu/sbas-results-menu/sbas-sliders-two/sbas-sliders-two.component.ts @@ -37,6 +37,7 @@ export class SbasSlidersTwoComponent implements OnInit { public temporal: number; public perpendicular: number; public daysRange: models.Range = {start: 1, end: 48}; + public lastRange: models.Range = {start: 0, end: 0}; public daysValues$ = new Subject(); public metersValues$ = new Subject(); // public perpStart = 800; @@ -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]); + } } ) );