comparison client/src/store/bottlenecks.js @ 1386:752b6bb2bee5

close splitscreen and clear cut tool when changing bottleneck
author Markus Kottlaender <markus@intevation.de>
date Tue, 27 Nov 2018 15:01:54 +0100
parents 553aadd97087
children b350b0b5cb6c
comparison
equal deleted inserted replaced
1382:8b85032ed3cd 1386:752b6bb2bee5
47 surveysLoading: (state, loading) => { 47 surveysLoading: (state, loading) => {
48 state.surveysLoading = loading; 48 state.surveysLoading = loading;
49 } 49 }
50 }, 50 },
51 actions: { 51 actions: {
52 setSelectedBottleneck({ state, commit, dispatch }, name) { 52 setSelectedBottleneck(
53 { state, commit, dispatch, rootState, rootGetters },
54 name
55 ) {
53 if (name !== state.selectedBottleneck) { 56 if (name !== state.selectedBottleneck) {
54 commit("setSelectedSurvey", null); 57 commit("setSelectedSurvey", null);
55 commit("fairwayprofile/clearCurrentProfile", null, { root: true }); 58 commit("fairwayprofile/clearCurrentProfile", null, { root: true });
59 commit("application/showSplitscreen", false, { root: true });
60 rootState.map.cutTool.setActive(false);
61 rootGetters["map/getVSourceByName"]("Cut Tool").clear();
56 } 62 }
57 if (name) { 63 if (name) {
58 commit("application/showProfiles", true, { root: true }); 64 commit("application/showProfiles", true, { root: true });
59 } 65 }
60 commit("setSelectedBottleneck", name); 66 commit("setSelectedBottleneck", name);