Mercurial > gemma
diff client/src/store/bottlenecks.js @ 3062:87e0422cffa7
client: draw/cut tools work now with multiple maps
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 16 Apr 2019 12:49:29 +0200 |
parents | c71373594719 |
children | a90091aaef67 |
line wrap: on
line diff
--- a/client/src/store/bottlenecks.js Tue Apr 16 12:39:55 2019 +0200 +++ b/client/src/store/bottlenecks.js Tue Apr 16 12:49:29 2019 +0200 @@ -60,7 +60,7 @@ } }, actions: { - setSelectedBottleneck({ state, commit, rootState, rootGetters }, name) { + setSelectedBottleneck({ state, commit, rootState }, name) { return new Promise((resolve, reject) => { if (name !== state.selectedBottleneck) { commit("selectedSurvey", null); @@ -73,11 +73,12 @@ commit("fairwayprofile/clearCurrentProfile", null, { root: true }); commit("application/splitscreenLoading", false, { root: true }); }, 350); - rootState.map.cutTool.setActive(false); - rootGetters["map/openLayersMap"] - .getLayer("CUTTOOL") - .getSource() - .clear(); + commit("map/cutToolEnabled", false, { root: true }); + rootState.map.openLayersMaps.forEach(m => { + m.getLayer("CUTTOOL") + .getSource() + .clear(); + }); } if (name) { commit("application/showProfiles", true, { root: true });