comparison client/src/store/identify.js @ 1096:aa1f5daf6fc9

refac: centralized stores
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 30 Oct 2018 16:55:29 +0100
parents client/src/identify/store.js@ca628dce90dd
children
comparison
equal deleted inserted replaced
1095:2d6d8b676e3f 1096:aa1f5daf6fc9
1 /*
2 * This is Free Software under GNU Affero General Public License v >= 3.0
3 * without warranty, see README.md and license for details.
4 *
5 * SPDX-License-Identifier: AGPL-3.0-or-later
6 * License-Filename: LICENSES/AGPL-3.0.txt
7 *
8 * Copyright (C) 2018 by via donau
9 * – Österreichische Wasserstraßen-Gesellschaft mbH
10 * Software engineering by Intevation GmbH
11 *
12 * Author(s):
13 * Thomas Junk <thomas.junk@intevation.de>
14 */
15
16 // note that some identified features may not have an id
17 // especially related to drawing in our own vector layer
18
19 const IndentifyStore = {
20 namespaced: true,
21 state: {
22 identifiedFeatures: [],
23 currentMeasurement: null
24 },
25 getters: {
26 identifiedFeatures: state => {
27 return state.identifiedFeatures;
28 },
29 currentMeasurement: state => {
30 return state.currentMeasurement;
31 }
32 },
33 mutations: {
34 setIdentifiedFeatures: (state, identifiedFeatures) => {
35 state.identifiedFeatures = identifiedFeatures;
36 },
37 setCurrentMeasurement: (state, measurement) => {
38 state.currentMeasurement = measurement;
39 }
40 }
41 };
42
43 export default IndentifyStore;