comparison client/src/fairway/store.js @ 802:327aa4a18a1c

Fairway profile WIP
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 27 Sep 2018 13:36:43 +0200
parents 1bee00039973
children 07be3e5f99a9
comparison
equal deleted inserted replaced
801:b6a1779ffb42 802:327aa4a18a1c
10 currentProfile: [], 10 currentProfile: [],
11 waterLevels: [ 11 waterLevels: [
12 { year: "2016", level: 0, color: "#005DFF" }, 12 { year: "2016", level: 0, color: "#005DFF" },
13 { year: "2017", level: -0.5, color: "#639CFF" } 13 { year: "2017", level: -0.5, color: "#639CFF" }
14 ], 14 ],
15 fairwayCoordinates: [],
15 startPoint: null, 16 startPoint: null,
16 endPoint: null 17 endPoint: null
17 }, 18 },
18 getters: { 19 getters: {
20 fairwayCoordinates: state => {
21 return state.fairwayCoordinates;
22 },
19 waterLevels: state => { 23 waterLevels: state => {
20 return state.waterLevels; 24 return state.waterLevels;
21 }, 25 },
22 currentProfile: state => { 26 currentProfile: state => {
23 return state.currentProfile; 27 return state.currentProfile;
58 setStartPoint: (state, start) => { 62 setStartPoint: (state, start) => {
59 state.startPoint = start; 63 state.startPoint = start;
60 }, 64 },
61 setEndPoint: (state, end) => { 65 setEndPoint: (state, end) => {
62 state.endPoint = end; 66 state.endPoint = end;
67 },
68 setFairwayCoordinates: (state, coordinates) => {
69 state.fairwayCoordinates = coordinates;
63 } 70 }
64 }, 71 },
65 72
66 actions: { 73 actions: {
67 loadProfile({ commit }, geoJSON) { 74 loadProfile({ commit }, geoJSON) {