# HG changeset patch # User Markus Kottlaender # Date 1556872431 -7200 # Node ID b6cc4838d2c0f5bf0ec66a2d24c2c13c0fc19d05 # Parent d33a5c1522dc2fb4c8afe430a0769bacaa6c86ef client: implemented pane mechanic for diagrams regressions: diagrams are currently not collapsible anymore, animations were removed diff -r d33a5c1522dc -r b6cc4838d2c0 client/src/components/Main.vue --- a/client/src/components/Main.vue Fri May 03 10:31:40 2019 +0200 +++ b/client/src/components/Main.vue Fri May 03 10:33:51 2019 +0200 @@ -1,30 +1,33 @@ @@ -60,31 +63,54 @@ */ import { mapState } from "vuex"; +import * as paneSetups from "./paneSetups"; export default { components: { Pane: () => import("./Pane") }, computed: { - ...mapState("application", ["panes", "paneRotate"]), - // pane 1 and 2 are the only ones that can have varying size - // thats why tehre is no pane3class or pane4class - pane1Classes() { - if (this.panes.length === 1) return "wh-100"; - if (this.panes.length === 2 || this.panes.length === 3) { - if (this.paneRotate === 1 || this.paneRotate === 3) return "w-100 h-50"; - if (this.paneRotate === 2 || this.paneRotate === 4) return "w-50 h-100"; + ...mapState("application", ["paneSetup", "paneRotate"]), + panes() { + return Object.values(paneSetups[this.paneSetup]); + }, + paneClasses() { + if (this.paneSetup === "DEFAULT") { + return ["wh-100"]; + } + + if (this.paneSetup === "COMPARESURVEYS") { + return [2, 4].includes(this.paneRotate) + ? ["w-100 h-50", "w-100 h-50"] + : ["w-50 h-100", "w-50 h-100"]; + } + + if (this.paneSetup === "FAIRWAYPROFILE") { + return [1, 3].includes(this.paneRotate) + ? ["w-100 h-50", "w-100 h-50"] + : ["w-50 h-100", "w-50 h-100"]; } - if (this.panes.length === 4) { - return "wh-50"; + + if (this.paneSetup === "COMPARESURVEYS_FAIRWAYPROFILE") { + return [1, 3].includes(this.paneRotate) + ? ["wh-50", "wh-50", "w-100 h-50"] + : ["wh-50", "wh-50", "w-50 h-100"]; } - }, - pane2Classes() { - if (this.panes.length === 2) { - if (this.paneRotate === 1 || this.paneRotate === 3) return "w-100 h-50"; - if (this.paneRotate === 2 || this.paneRotate === 4) return "w-50 h-100"; - } else { - return "wh-50"; + + if ( + ["GAUGE_WATERLEVEL", "GAUGE_HYDROLOGICALCONDITIONS"].includes( + this.paneSetup + ) + ) { + 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 === "GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS") { + return [1, 3].includes(this.paneRotate) + ? ["w-100 h-50", "wh-50", "wh-50"] + : ["h-100 w-50", "wh-50", "wh-50"]; } } } diff -r d33a5c1522dc -r b6cc4838d2c0 client/src/components/Pane.vue --- a/client/src/components/Pane.vue Fri May 03 10:31:40 2019 +0200 +++ b/client/src/components/Pane.vue Fri May 03 10:33:51 2019 +0200 @@ -1,13 +1,6 @@ diff -r d33a5c1522dc -r b6cc4838d2c0 client/src/components/fairway/Fairwayprofile.vue --- a/client/src/components/fairway/Fairwayprofile.vue Fri May 03 10:31:40 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Fri May 03 10:33:51 2019 +0200 @@ -1,32 +1,35 @@