Mercurial > gemma
changeset 3178:5ec34e08b01d
available_fairway_depth: display mock
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 07 May 2019 12:59:24 +0200 |
parents | fc008b32c593 |
children | 6ddd3755350c |
files | client/src/components/Main.vue client/src/components/Statistics.vue client/src/components/paneSetups.js |
diffstat | 3 files changed, 26 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Main.vue Tue May 07 12:18:07 2019 +0200 +++ b/client/src/components/Main.vue Tue May 07 12:59:24 2019 +0200 @@ -91,6 +91,12 @@ : ["w-50 h-100", "w-50 h-100"]; } + if (this.paneSetup === "AVAILABLEFAIRWAYDEPTH") { + return [1, 3].includes(this.paneRotate) + ? ["w-100 h-50", "w-100 h-50"] + : ["w-50 h-100", "w-50 h-100"]; + } + if (this.paneSetup === "COMPARESURVEYS_FAIRWAYPROFILE") { return [1, 3].includes(this.paneRotate) ? ["wh-50", "wh-50", "w-100 h-50"]
--- a/client/src/components/Statistics.vue Tue May 07 12:18:07 2019 +0200 +++ b/client/src/components/Statistics.vue Tue May 07 12:59:24 2019 +0200 @@ -46,6 +46,7 @@ </div> <div class="mt-3"> <button + @click="openFairwaydepth" :disabled="selectedEntry == null" class="btn btn-info btn-sm w-100" > @@ -85,6 +86,9 @@ }; }, methods: { + openFairwaydepth() { + this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH"); + }, close() { this.$store.commit("application/showStatistics", false); }, @@ -93,10 +97,12 @@ this.openLayersMap() .getLayer("BOTTLENECKS") .setVisible(true); - this.$store.dispatch( - "bottlenecks/setSelectedBottleneck", - this.selectedEntry.properties.name - ); + if (this.showProfiles) { + this.$store.dispatch( + "bottlenecks/setSelectedBottleneck", + this.selectedEntry.properties.name + ); + } } if (this.type === this.$options.STRETCHES) { this.openLayersMap() @@ -119,7 +125,7 @@ } }, computed: { - ...mapState("application", ["showStatistics", "paneSetup"]), + ...mapState("application", ["showStatistics", "paneSetup", "showProfiles"]), ...mapState("imports", ["stretches"]), ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]), ...mapGetters("map", ["openLayersMap"]),
--- a/client/src/components/paneSetups.js Tue May 07 12:18:07 2019 +0200 +++ b/client/src/components/paneSetups.js Tue May 07 12:59:24 2019 +0200 @@ -9,6 +9,15 @@ main, fairwayprofile: { id: "fairwayprofile", component: "Fairwayprofile" } }; + +export const AVAILABLEFAIRWAYDEPTH = { + main, + availablefairwaydepth: { + id: "availablefairwaydepth", + component: "AvailableFairwayDepth" + } +}; + export const COMPARESURVEYS_FAIRWAYPROFILE = { main, compare: { id: "compare-survey", component: "Map" },