Skip to content

Commit

Permalink
renamed functions for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
popenc committed Aug 19, 2024
1 parent f2532eb commit d4942e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cyan_angular/src/app/bottom-menu/bottom-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class BottomMenuComponent implements OnInit {
this.data_type = type;
this.locationService.setDataType(type);
let dataBool = type === 2 ? true : false;
this.markerMap.getMostCurrentAvailableDate(dataBool);
this.markerMap.getMostCurrentAvailableDateForConusImage(dataBool);
}

reloadClick(): void {
Expand Down
6 changes: 3 additions & 3 deletions cyan_angular/src/app/marker-map/marker-map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class MarkerMapComponent implements OnInit {

this.configSetSub = this.envService.configSetObservable.subscribe(configSet => {
if (configSet === true) {
this.getMostCurrentAvailableDate(false, false);
this.getMostCurrentAvailableDateForConusImage(false, false);
}
});

Expand Down Expand Up @@ -189,7 +189,7 @@ export class MarkerMapComponent implements OnInit {
});
}

getMostCurrentAvailableDate(daily: boolean = true, initImageLoad: boolean = true) {
getMostCurrentAvailableDateForConusImage(daily: boolean = true, initImageLoad: boolean = true) {
/*
Makes requests for most current available date. Goes back
previous days until it finds an available date.
Expand All @@ -215,7 +215,7 @@ export class MarkerMapComponent implements OnInit {
return;
}
this.currentAttempts += 1;
this.getMostCurrentAvailableDate(daily, initImageLoad);
this.getMostCurrentAvailableDateForConusImage(daily, initImageLoad);
}
else {
this.currentAttempts = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class WaterBodyStatsDetails {

let currentDate = this.calcs.getDayOfYearFromDateObject(new Date());

this.getMostCurrentAvailableDate();
this.getMostCurrentAvailableDateForWB();

this.getWaterbodyGeojson(this.selectedWaterbody);

Expand All @@ -250,7 +250,7 @@ export class WaterBodyStatsDetails {
this.mapService.waterbodyDataLayer.addTo(this.mapService.getMap());
}

getMostCurrentAvailableDate() {
getMostCurrentAvailableDateForWB() {
/*
Makes requests for most current available date. Goes back
previous days until it finds an available date.
Expand Down Expand Up @@ -291,7 +291,7 @@ export class WaterBodyStatsDetails {
this.dialog.handleError('No ' + this.selectedDataType + ' waterbody data currently available');
}
this.currentAttempts += 1;
this.getMostCurrentAvailableDate();
this.getMostCurrentAvailableDateForWB();
}
else {

Expand Down Expand Up @@ -619,7 +619,7 @@ export class WaterBodyStatsDetails {
}

// this.updateDateRange(this.selectedDateRange);
this.getMostCurrentAvailableDate(); // gets most recent available date with data when changing data type
this.getMostCurrentAvailableDateForWB(); // gets most recent available date with data when changing data type

}

Expand Down

0 comments on commit d4942e1

Please sign in to comment.