diff client/src/store/gauges.js @ 4292:18a34d9b289c

data availability layer: loader uses new cache
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 30 Aug 2019 12:36:27 +0200
parents 81ab34bd2d0d
children 51dc4811a0e6
line wrap: on
line diff
--- a/client/src/store/gauges.js	Fri Aug 30 12:11:35 2019 +0200
+++ b/client/src/store/gauges.js	Fri Aug 30 12:36:27 2019 +0200
@@ -38,7 +38,6 @@
     longtermInterval: [],
     yearWaterlevels: [],
     nashSutcliffe: null,
-    nashSutcliffeOverview: [],
     nashSutcliffeCache: {},
     dateFrom: dateFrom,
     dateTo: dateTo,
@@ -55,11 +54,6 @@
       return state.gauges.find(
         g => g.properties.isrs_code === state.selectedGaugeISRS
       );
-    },
-    nashSutcliffeOverview: state => feature => {
-      return state.nashSutcliffeOverview.find(
-        d => d.feature.get("id") === feature.get("id")
-      );
     }
   },
   mutations: {
@@ -95,15 +89,7 @@
       state.nashSutcliffe = data;
     },
     deleteNashSutcliffeCache: state => {
-      state.nashSutcliffeOverview = [];
-    },
-    addNashSutcliffeOverviewEntry: (state, data) => {
-      let existingIndex = state.nashSutcliffeOverview.findIndex(
-        d => d.feature.get("id") === data.feature.get("id")
-      );
-      if (existingIndex !== -1)
-        state.nashSutcliffeOverview.splice(existingIndex, 1);
-      state.nashSutcliffeOverview.push(data);
+      state.nashSutcliffeCache = {};
     },
     dateFrom: (state, dateFrom) => {
       state.dateFrom = dateFrom;