Mercurial > gemma
view client/src/components/importoverview/SoundingResultDetail.vue @ 2907:ab0a829735f6
client: import stretches: removed unnecessary wrapper method
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 02 Apr 2019 16:55:55 +0200 |
parents | 0ab7985ef008 |
children | 80815b0a665c |
line wrap: on
line source
<template> <div> <span class="empty"></span> <a @click="zoomTo()" class="text-info pointer"> {{ details.summary.bottleneck }} </a> </div> </template> <script> /* This is Free Software under GNU Affero General Public License v >= 3.0 * without warranty, see README.md and license for details. * * SPDX-License-Identifier: AGPL-3.0-or-later * License-Filename: LICENSES/AGPL-3.0.txt * * Copyright (C) 2018 by via donau * – Österreichische Wasserstraßen-Gesellschaft mbH * Software engineering by Intevation GmbH * * Author(s): * Thomas Junk <thomas.junk@intevation.de> */ import { mapState } from "vuex"; export default { name: "soundingresultdetails", props: ["entry"], mounted() { this.$store.commit("imports/hideAdditionalInfo"); }, computed: { ...mapState("imports", ["showAdditional", "details"]) }, methods: { moveMap(coordinates) { this.$store.commit("map/moveMap", { coordinates: coordinates, zoom: 17, preventZoomOut: true }); }, zoomTo() { const { lat, lon, bottleneck, date } = this.details.summary; const coordinates = [lat, lon]; this.moveMap(coordinates); this.$store .dispatch("bottlenecks/setSelectedBottleneck", bottleneck) .then(() => { this.$store.commit("bottlenecks/setSelectedSurveyByDate", date); }); } } }; </script> <style></style>