comparison client/src/fairway/Fairwayprofile.vue @ 841:07be3e5f99a9

WIP Fairwayprofile
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 28 Sep 2018 11:23:50 +0200
parents 68a39aea942a
children c2cba785ca4d
comparison
equal deleted inserted replaced
840:0f61bfc21041 841:07be3e5f99a9
45 "yScaleLeft", 45 "yScaleLeft",
46 "yScaleRight", 46 "yScaleRight",
47 "margin", 47 "margin",
48 "totalLength", 48 "totalLength",
49 "waterLevels", 49 "waterLevels",
50 "fairwayCoordinates" 50 "fairwayCoordinates",
51 "selectedWaterLevel"
51 ], 52 ],
52 computed: { 53 computed: {
53 waterColor() { 54 waterColor() {
54 const result = this.waterLevels.find( 55 const result = this.waterLevels.find(
55 x => x.level === this.selectedWaterLevel 56 x => x.level === this.selectedWaterLevel
56 ); 57 );
57 return result.color; 58 return result.color;
58 } 59 }
59 }, 60 },
60 data() { 61 data() {
61 return { 62 return {};
62 selectedWaterLevel: this.waterLevels[0].level
63 };
64 }, 63 },
65 watch: { 64 watch: {
66 data() { 65 data() {
67 this.drawDiagram(); 66 this.drawDiagram();
68 }, 67 },