Skip to content

Commit

Permalink
give method a better name
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jul 12, 2024
1 parent 3192d44 commit fec031e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/src/corridor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Corridor extends Factor {
.then( () => {
// notify the layout that the path is ready to be rendered
logActivity('shortest path returned')
this.notifyIsUpdated()
this.hasUpdated()
} )
}
get intersections(){ return [...this.#intersections.values()] }
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/dateRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export class DateRange extends Factor {
}
setStartDate(inputDate){
this.#startDate = inputDate
this.notifyIsUpdated()
this.hasUpdated()
return this.#startDate
}
setEndDate(inputDate){
this.#endDate = inputDate
this.notifyIsUpdated()
this.hasUpdated()
return this.#endDate
}
static dateFormatted(datetime){
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/days.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export class Days extends Factor {
addDay(number){
if( daylist.map(d=>d.iso).includes(parseInt(number)) ){
this.#days.add(parseInt(number))
this.notifyIsUpdated()
this.hasUpdated()
}
}
removeDay(number){
let dayNum = parseInt(number)
if(this.#days.has(dayNum)){
this.#days.delete(dayNum)
this.notifyIsUpdated()
this.hasUpdated()
}
}
hasDay(number){
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/factor.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class Factor {
render(){ // this will be overwritten but must be implemented
return <></>
}
notifyIsUpdated(){
// should be called when a factor has been updated and is complete
hasUpdated(){
// should be called when a factor has been updated
this.#dataContext.updateQueries()
}
}
4 changes: 2 additions & 2 deletions frontend/src/timeRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export class TimeRange extends Factor {
}
setStartTime(input){
this.#startTime = TimeRange.parseTime(input)
this.notifyIsUpdated()
this.hasUpdated()
return this.#startTime
}
setEndTime(input){
this.#endTime = TimeRange.parseTime(input)
this.notifyIsUpdated()
this.hasUpdated()
return this.#endTime
}
static timeFormatted(datetime){
Expand Down

0 comments on commit fec031e

Please sign in to comment.