From fec031e8030603d09954d6742d2207327d33a1d8 Mon Sep 17 00:00:00 2001 From: Nate-Wessel Date: Fri, 12 Jul 2024 20:45:12 +0000 Subject: [PATCH] give method a better name --- frontend/src/corridor.js | 2 +- frontend/src/dateRange.js | 4 ++-- frontend/src/days.js | 4 ++-- frontend/src/factor.js | 4 ++-- frontend/src/timeRange.js | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/corridor.js b/frontend/src/corridor.js index 047cebd..431efe4 100644 --- a/frontend/src/corridor.js +++ b/frontend/src/corridor.js @@ -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()] } diff --git a/frontend/src/dateRange.js b/frontend/src/dateRange.js index 44ed166..96b90ed 100644 --- a/frontend/src/dateRange.js +++ b/frontend/src/dateRange.js @@ -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){ diff --git a/frontend/src/days.js b/frontend/src/days.js index f56916a..b798cc2 100644 --- a/frontend/src/days.js +++ b/frontend/src/days.js @@ -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){ diff --git a/frontend/src/factor.js b/frontend/src/factor.js index 892f592..e46b1d2 100644 --- a/frontend/src/factor.js +++ b/frontend/src/factor.js @@ -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() } } \ No newline at end of file diff --git a/frontend/src/timeRange.js b/frontend/src/timeRange.js index b2b5f44..22ef535 100644 --- a/frontend/src/timeRange.js +++ b/frontend/src/timeRange.js @@ -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){