comparison client/src/identify/store.js @ 975:3da707172772

refac: removed technical debt Cleaned up mapstore to adhere more to Single Repsonsibility Principle (SRP)
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 18 Oct 2018 16:47:17 +0200
parents
children ca628dce90dd
comparison
equal deleted inserted replaced
974:7a89313f0ead 975:3da707172772
1 // note that some identified features may not have an id
2 // especially related to drawing in our own vector layer
3
4 const IndentifyStore = {
5 namespaced: true,
6 state: {
7 identifiedFeatures: [],
8 currentMeasurement: null
9 },
10 getters: {
11 identifiedFeatures: state => {
12 return state.identifiedFeatures;
13 },
14 currentMeasurement: state => {
15 return state.currentMeasurement;
16 }
17 },
18 mutations: {
19 setIdentifiedFeatures: (state, identifiedFeatures) => {
20 state.identifiedFeatures = identifiedFeatures;
21 },
22 setCurrentMeasurement: (state, measurement) => {
23 state.currentMeasurement = measurement;
24 }
25 }
26 };
27
28 export default IndentifyStore;