Mercurial > gemma
comparison client/src/store/application.js @ 1115:1b160eda22cf store-refactoring
moved drawMode to map store
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 05 Nov 2018 14:05:01 +0100 |
parents | 8d12056d602a |
children | d9e6a1f6f394 |
comparison
equal
deleted
inserted
replaced
1114:8d12056d602a | 1115:1b160eda22cf |
---|---|
37 splitsceen: initializeSplitScreen(), | 37 splitsceen: initializeSplitScreen(), |
38 usermenu: { | 38 usermenu: { |
39 iscollapsed: defaultCollapseState | 39 iscollapsed: defaultCollapseState |
40 }, | 40 }, |
41 countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"], | 41 countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"], |
42 // there are three states of drawMode: null, "LineString", "Polygon" | |
43 drawMode: null, | |
44 version | 42 version |
45 }, | 43 }, |
46 getters: { | 44 getters: { |
47 countries: state => { | 45 countries: state => { |
48 return state.countries; | 46 return state.countries; |
112 collapseUserMenu: state => { | 110 collapseUserMenu: state => { |
113 state.usermenu.iscollapsed = true; | 111 state.usermenu.iscollapsed = true; |
114 }, | 112 }, |
115 resetSplitScreen: state => { | 113 resetSplitScreen: state => { |
116 state.splitsceen = initializeSplitScreen(); | 114 state.splitsceen = initializeSplitScreen(); |
117 }, | |
118 toggleDrawModeLine: state => { | |
119 if (state.drawMode) { | |
120 state.drawMode = null; | |
121 } else { | |
122 state.drawMode = "LineString"; | |
123 } | |
124 }, | |
125 activateDrawModePolygon: state => { | |
126 state.drawMode = "Polygon"; | |
127 } | 115 } |
128 }, | 116 }, |
129 actions: {} | 117 actions: {} |
130 }; | 118 }; |