Mercurial > gemma
view client/src/components/importoverview/SoundingResultDetail.vue @ 2715:8d96b9254465
client: waterlevel diagram: fixed console error when hovering the chart where no data is available
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 18 Mar 2019 18:14:24 +0100 |
parents | 39a05f8c34e6 |
children | 5b990f612420 |
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> */ export default { name: "soundingresultdetails", props: ["entry", "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>