Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
3061:563176194d74 | 3062:87e0422cffa7 |
---|---|
58 surveysLoading: (state, loading) => { | 58 surveysLoading: (state, loading) => { |
59 state.surveysLoading = loading; | 59 state.surveysLoading = loading; |
60 } | 60 } |
61 }, | 61 }, |
62 actions: { | 62 actions: { |
63 setSelectedBottleneck({ state, commit, rootState, rootGetters }, name) { | 63 setSelectedBottleneck({ state, commit, rootState }, name) { |
64 return new Promise((resolve, reject) => { | 64 return new Promise((resolve, reject) => { |
65 if (name !== state.selectedBottleneck) { | 65 if (name !== state.selectedBottleneck) { |
66 commit("selectedSurvey", null); | 66 commit("selectedSurvey", null); |
67 commit("application/splitscreenLoading", true, { root: true }); | 67 commit("application/splitscreenLoading", true, { root: true }); |
68 commit("application/showSplitscreen", false, { root: true }); | 68 commit("application/showSplitscreen", false, { root: true }); |
71 }); | 71 }); |
72 setTimeout(() => { | 72 setTimeout(() => { |
73 commit("fairwayprofile/clearCurrentProfile", null, { root: true }); | 73 commit("fairwayprofile/clearCurrentProfile", null, { root: true }); |
74 commit("application/splitscreenLoading", false, { root: true }); | 74 commit("application/splitscreenLoading", false, { root: true }); |
75 }, 350); | 75 }, 350); |
76 rootState.map.cutTool.setActive(false); | 76 commit("map/cutToolEnabled", false, { root: true }); |
77 rootGetters["map/openLayersMap"] | 77 rootState.map.openLayersMaps.forEach(m => { |
78 .getLayer("CUTTOOL") | 78 m.getLayer("CUTTOOL") |
79 .getSource() | 79 .getSource() |
80 .clear(); | 80 .clear(); |
81 }); | |
81 } | 82 } |
82 if (name) { | 83 if (name) { |
83 commit("application/showProfiles", true, { root: true }); | 84 commit("application/showProfiles", true, { root: true }); |
84 } | 85 } |
85 commit("setSelectedBottleneck", name); | 86 commit("setSelectedBottleneck", name); |