comparison client/src/store/diagram.js @ 3205:bf571429515f

client: fairway availability: moved component's type property to store to manipulate it from outside
author Markus Kottlaender <markus@intevation.de>
date Wed, 08 May 2019 17:15:08 +0200
parents cb67ee72485b
children
comparison
equal deleted inserted replaced
3204:1253fe15e3e3 3205:bf571429515f
14 14
15 import { HTTP } from "@/lib/http"; 15 import { HTTP } from "@/lib/http";
16 16
17 const init = () => { 17 const init = () => {
18 return { 18 return {
19 type: "bottlenecks",
19 selectedFairwayAvailabilityFeature: null, 20 selectedFairwayAvailabilityFeature: null,
20 from: null, 21 from: null,
21 to: null, 22 to: null,
22 frequency: null, 23 frequency: null,
23 fwData: null, 24 fwData: null,
29 const diagram = { 30 const diagram = {
30 init, 31 init,
31 namespaced: true, 32 namespaced: true,
32 state: init(), 33 state: init(),
33 mutations: { 34 mutations: {
35 type: (state, type) => {
36 state.type = type;
37 },
34 setLOS: (state, LOS) => { 38 setLOS: (state, LOS) => {
35 state.LOS = LOS; 39 state.LOS = LOS;
36 }, 40 },
37 setFrequency: (state, frequency) => { 41 setFrequency: (state, frequency) => {
38 state.frequency = frequency; 42 state.frequency = frequency;