# HG changeset patch # User Markus Kottlaender # Date 1542628968 -3600 # Node ID 70116d392387d7283f2abe39d5bc94abf64f8c71 # Parent 0900b341cef071faa61502a4e57ea3e84b0b98b8 close bottleneck list: made searchbar collapse only if it was collapsed before opening the bottleneck list will expand the searchbar, closing the bottleneck list was always collapsing the searchbar too. Now it stays open if it was open beforeopening the bottleneck list diff -r 0900b341cef0 -r 70116d392387 client/src/application/Search.vue --- a/client/src/application/Search.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/application/Search.vue Mon Nov 19 13:02:48 2018 +0100 @@ -29,7 +29,7 @@ height: $icon-height .searchbar-expanded - min-width: 568px + min-width: 600px .searchbar border-top-left-radius: 0 !important border-bottom-left-radius: 0 !important diff -r 0900b341cef0 -r 70116d392387 client/src/application/Sidebar.vue --- a/client/src/application/Sidebar.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/application/Sidebar.vue Mon Nov 19 13:02:48 2018 +0100 @@ -89,7 +89,8 @@ ...mapState("application", [ "showSidebar", "showBottlenecks", - "showImportSoundingResults" + "showImportSoundingResults", + "showSearchbarLastState" ]), menuStyle() { return { @@ -119,7 +120,11 @@ toggleBottlenecks() { this.$store.commit("application/showBottlenecks", !this.showBottlenecks); this.$store.commit("application/showImportSoundingResults", false); - this.$store.commit("application/showSearchbar", this.showBottlenecks); + if (this.showBottlenecks) { + this.$store.commit("application/showSearchbar", true); + } else { + this.$store.commit("application/showSearchbar", this.showSearchbarLastState); + } }, toggleImportSoundingResults() { this.$store.commit( diff -r 0900b341cef0 -r 70116d392387 client/src/bottlenecks/Bottlenecks.vue --- a/client/src/bottlenecks/Bottlenecks.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/bottlenecks/Bottlenecks.vue Mon Nov 19 13:02:48 2018 +0100 @@ -82,7 +82,8 @@ ...mapState("application", [ "showBottlenecks", "showSidebar", - "searchQuery" + "searchQuery", + "showSearchbarLastState" ]), ...mapState("bottlenecks", ["bottlenecks"]), ...mapState("map", ["openLayersMap"]), @@ -198,7 +199,7 @@ }, closeBottlenecks() { this.$store.commit("application/showBottlenecks", false); - this.$store.commit("application/showSearchbar", false); + this.$store.commit("application/showSearchbar", this.showSearchbarLastState); }, displayCurrentSurvey(current) { return current ? current.substr(0, current.length - 1) : ""; diff -r 0900b341cef0 -r 70116d392387 client/src/store/application.js --- a/client/src/store/application.js Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/store/application.js Mon Nov 19 13:02:48 2018 +0100 @@ -26,6 +26,7 @@ showBottlenecks: false, showSplitscreen: false, showSearchbar: false, + showSearchbarLastState: false, showIdentify: false, showLayers: true, showPdfTool: false, @@ -57,6 +58,9 @@ }, showBottlenecks: (state, show) => { state.showBottlenecks = show; + if (show) { + state.showSearchbarLastState = state.showSearchbar; + } }, showSplitscreen: (state, show) => { state.showSplitscreen = show;