# HG changeset patch # User Thomas Junk # Date 1543421392 -3600 # Node ID 9d2806002f50d578aada8bd068d81566edec10e1 # Parent 522488564de06db4ba4ee56a93685cc02bcbcea2 staging: activate according soundingresult diff -r 522488564de0 -r 9d2806002f50 client/src/components/map/contextbox/Staging.vue --- a/client/src/components/map/contextbox/Staging.vue Wed Nov 28 16:47:36 2018 +0100 +++ b/client/src/components/map/contextbox/Staging.vue Wed Nov 28 17:09:52 2018 +0100 @@ -1,7 +1,8 @@ @@ -123,13 +125,19 @@ isApproved(item) { return item.status === STATES.APPROVED; }, - zoomTo(coordinates) { - if (!coordinates) return; + zoomTo(id) { + if (!id) return; + const soundingResult = this.filteredData.filter(x => x.id == id)[0]; + const { lat, lon, bottleneck, date } = soundingResult.summary; + const coordinates = [lat, lon]; + this.$store.commit("map/moveMap", { coordinates: coordinates, zoom: 17, preventZoomOut: true }); + this.$store.dispatch("bottlenecks/setSelectedBottleneck", bottleneck); + this.$store.commit("bottlenecks/selectedSurvey", date); }, toggleApproval(id, newStatus) { this.$store.commit("imports/toggleApproval", {