Mercurial > gemma
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/identify/store.js Thu Oct 18 16:47:17 2018 +0200 @@ -0,0 +1,28 @@ +// note that some identified features may not have an id +// especially related to drawing in our own vector layer + +const IndentifyStore = { + namespaced: true, + state: { + identifiedFeatures: [], + currentMeasurement: null + }, + getters: { + identifiedFeatures: state => { + return state.identifiedFeatures; + }, + currentMeasurement: state => { + return state.currentMeasurement; + } + }, + mutations: { + setIdentifiedFeatures: (state, identifiedFeatures) => { + state.identifiedFeatures = identifiedFeatures; + }, + setCurrentMeasurement: (state, measurement) => { + state.currentMeasurement = measurement; + } + } +}; + +export default IndentifyStore;