Mercurial > gemma
comparison client/src/components/gauge/Gauges.vue @ 2696:cc3eee8b5d71
client: waterlevel diagram: update diagram immediately when selectedGauge changes
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 18 Mar 2019 10:52:35 +0100 |
parents | 50cfb12a54a4 |
children | e622689d73bd |
comparison
equal
deleted
inserted
replaced
2695:04b082a86d50 | 2696:cc3eee8b5d71 |
---|---|
98 loading: false, | 98 loading: false, |
99 waterlevelsTimePeriod: "day" | 99 waterlevelsTimePeriod: "day" |
100 }; | 100 }; |
101 }, | 101 }, |
102 computed: { | 102 computed: { |
103 ...mapState("application", ["showGauges"]), | 103 ...mapState("application", ["showGauges", "activeSplitscreenId"]), |
104 ...mapState("gauges", ["gauges"]), | 104 ...mapState("gauges", ["gauges"]), |
105 ...mapGetters("gauges", ["selectedGauge"]), | 105 ...mapGetters("gauges", ["selectedGauge"]), |
106 selectedGaugeISRS: { | 106 selectedGaugeISRS: { |
107 get() { | 107 get() { |
108 return this.$store.state.gauges.selectedGaugeISRS; | 108 return this.$store.state.gauges.selectedGaugeISRS; |
109 }, | 109 }, |
110 set(isrs) { | 110 set(isrs) { |
111 this.$store.dispatch("gauges/selectedGaugeISRS", isrs); | 111 this.$store.dispatch("gauges/selectedGaugeISRS", isrs); |
112 } | |
113 } | |
114 }, | |
115 watch: { | |
116 selectedGaugeISRS() { | |
117 if (this.activeSplitscreenId === "gauge-waterlevel") { | |
118 this.showWaterlevelDiagram(); | |
112 } | 119 } |
113 } | 120 } |
114 }, | 121 }, |
115 methods: { | 122 methods: { |
116 close() { | 123 close() { |