diff client/src/store/application.js @ 5085:fe63733750d7 time-sliding

client: correct refresh layers request time * make a variable "refreshLayersTime" to track the time used in the refreshLayers request, to avoid using old value as long as "currentVisibleTime" gets its value after the refreshLayers request is ended, which was leading to show time in toolbar does not actually match the time in the layers reload request.
author Fadi Abbud <fadi.abbud@intevation.de>
date Thu, 19 Mar 2020 17:43:23 +0100
parents aeb100b4c41b
children 70bd5c824639
line wrap: on
line diff
--- a/client/src/store/application.js	Thu Mar 19 07:23:35 2020 +0100
+++ b/client/src/store/application.js	Thu Mar 19 17:43:23 2020 +0100
@@ -49,6 +49,7 @@
     searchQuery: "",
     selectedTime: new Date(),
     currentVisibleTime: new Date(),
+    refreshLayersTime: new Date(),
     version,
     tempRoute: "",
     config: {}
@@ -83,6 +84,9 @@
     setCurrentVisibleTime: (state, currentVisibleTime) => {
       state.currentVisibleTime = currentVisibleTime;
     },
+    setLayerRefreshedTime: (state, refreshLayersTime) => {
+      state.refreshLayersTime = refreshLayersTime;
+    },
     setTempRoute: (state, tempRoute) => {
       state.tempRoute = tempRoute;
     },