Mercurial > gemma
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/fairway/store.js Thu Sep 13 13:02:04 2018 +0200 @@ -0,0 +1,33 @@ +// import { HTTP } from "../lib/http"; + +const sampleData = [ + { x: 0, y: 1.0 }, + { x: 10, y: 1.0 }, + { x: 25, y: -2.0 }, + { x: 50, y: -4.5 }, + { x: 75, y: -4.0 }, + { x: 100, y: -3.0 }, + { x: 125, y: -4.0 }, + { x: 150, y: -5.0 }, + { x: 175, y: -4.0 }, + { x: 200, y: -3.0 }, + { x: 225, y: -3.5 }, + { x: 250, y: -3.0 }, + { x: 290, y: 1 }, + { x: 300, y: 1 } +]; + +const FairwayProfile = { + namespaced: true, + state: { + currentProfile: sampleData + }, + getters: { + currentProfile: state => { + return state.currentProfile; + } + }, + mutations: {} +}; + +export default FairwayProfile;