Mercurial > gemma
comparison client/src/fairway/store.js @ 646:4450f2ab41e0
refac: Fairwawprofile view adapted
1) Made view responsive to browser resize events
2) Factored out sample data into separate store component
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 13 Sep 2018 13:02:04 +0200 |
parents | |
children | dedf252b3e01 |
comparison
equal
deleted
inserted
replaced
645:794592cad75a | 646:4450f2ab41e0 |
---|---|
1 // import { HTTP } from "../lib/http"; | |
2 | |
3 const sampleData = [ | |
4 { x: 0, y: 1.0 }, | |
5 { x: 10, y: 1.0 }, | |
6 { x: 25, y: -2.0 }, | |
7 { x: 50, y: -4.5 }, | |
8 { x: 75, y: -4.0 }, | |
9 { x: 100, y: -3.0 }, | |
10 { x: 125, y: -4.0 }, | |
11 { x: 150, y: -5.0 }, | |
12 { x: 175, y: -4.0 }, | |
13 { x: 200, y: -3.0 }, | |
14 { x: 225, y: -3.5 }, | |
15 { x: 250, y: -3.0 }, | |
16 { x: 290, y: 1 }, | |
17 { x: 300, y: 1 } | |
18 ]; | |
19 | |
20 const FairwayProfile = { | |
21 namespaced: true, | |
22 state: { | |
23 currentProfile: sampleData | |
24 }, | |
25 getters: { | |
26 currentProfile: state => { | |
27 return state.currentProfile; | |
28 } | |
29 }, | |
30 mutations: {} | |
31 }; | |
32 | |
33 export default FairwayProfile; |