diff client/src/components/TimeSlider.vue @ 5075:aeb100b4c41b time-sliding

timeslider: prerequisites for time travel * splitting selected time to a) the actual time visible on map (in the toolbar) b) the actual selected time with the timeslider Analogous to an event "ongoing refresh" we have "ongoing timeslide". During this event (a) stays the same according to the information presented on the screen. (b) is not affected. As soon as the loaders settle, the next requests are started with the then "selected time" and the actual time visible on map is set to this new value. Reloading the layers "jumps back to now".
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 13 Mar 2020 10:37:44 +0100
parents 8ec4f1a0db86
children faa1521e597b
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue	Thu Mar 12 11:08:12 2020 +0100
+++ b/client/src/components/TimeSlider.vue	Fri Mar 13 10:37:44 2020 +0100
@@ -98,11 +98,18 @@
       if (this.ongoingRefresh) return;
       this.$store.commit("application/setSelectedTime", new Date());
       this.$nextTick(this.rescaleSlider(1));
+    },
+    ongoingTimeSlide() {
+      if (this.ongoingTimeSlide) return;
+      this.$store.commit(
+        "application/setCurrentVisibleTime",
+        this.selectedTime
+      );
     }
   },
   computed: {
     ...mapState("application", ["showTimeSlider", "paneSetup"]),
-    ...mapState("map", ["ongoingRefresh"]),
+    ...mapState("map", ["ongoingRefresh", "ongoingTimeSlide"]),
     reposition() {
       // reposition time slider in case of opened diagram
       if (["DEFAULT", "COMPARESURVEYS"].indexOf(this.paneSetup) === -1) {