From f347d5df65183a2c97bc87a1a49b655c706ef0a9 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 20 Mar 2023 16:15:50 +0000 Subject: [PATCH] add 'show all trains' toggle --- src/pages/MapPage.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/pages/MapPage.vue b/src/pages/MapPage.vue index 4330684..e01b274 100644 --- a/src/pages/MapPage.vue +++ b/src/pages/MapPage.vue @@ -23,6 +23,10 @@
TRAINS
+
+ + +
@@ -164,6 +168,7 @@ export default { showAllStations: true, showMainlandStations: true, showDARTStations: true, + showAllTrains: true, showLate: true, showOnTime: true, showMainland: true, @@ -300,6 +305,17 @@ export default { this.showMainlandStations = this.showAllStations; }, + // method to select all trains + selectAllTrains() { + this.showLate = this.showAllTrains; + this.showOnTime = this.showAllTrains; + this.showMainland = this.showAllTrains; + this.showDART = this.showAllTrains; + this.showRunning = this.showAllTrains; + this.showTerminated = this.showAllTrains; + this.showNotYetRunning = this.showAllTrains; + }, + // method to display a selected train getSelectedTrain(i) { store.setSelectedTrain(this.allTrains[i]);