Mercurial > gemma
changeset 2644:50cfb12a54a4
client: gauges: fixed bug with panning to gauge...
...when diagram is expanded after collapsing it and then chosing another gauge
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 14 Mar 2019 13:16:43 +0100 |
parents | 27933e66e848 |
children | 6374fc404fdc |
files | client/src/components/gauge/Gauges.vue |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/gauge/Gauges.vue Thu Mar 14 13:11:22 2019 +0100 +++ b/client/src/components/gauge/Gauges.vue Thu Mar 14 13:16:43 2019 +0100 @@ -125,6 +125,11 @@ }); }, showWaterlevelDiagram() { + // for panning the map to the gauge on opening the diagram: needs to be + // set outside of the expandCallback to not always refer to the currently + // selectedGauge + let coordinates = this.selectedGauge.geometry.coordinates; + // configure splitscreen let splitscreenConf = { id: "gauge-waterlevel", @@ -140,7 +145,7 @@ }, expandCallback: () => { this.$store.commit("map/moveMap", { - coordinates: this.selectedGauge.geometry.coordinates, + coordinates, zoom: 17, preventZoomOut: true });