Mercurial > gemma
changeset 5058:e916651d3f93 time-sliding
client: adjust time-slider position in case of opened diagram
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 06 Mar 2020 17:21:20 +0100 |
parents | abe3a70526a6 |
children | c4f90dcd7c15 |
files | client/src/components/TimeSlider.vue |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue Fri Mar 06 13:30:10 2020 +0100 +++ b/client/src/components/TimeSlider.vue Fri Mar 06 17:21:20 2020 +0100 @@ -5,6 +5,7 @@ 'd-flex box ui-element rounded bg-white flex-row', { expanded: showTimeSlider } ]" + :style="reposition" > <div class="d-flex mt-1 mr-1"> <input @@ -78,8 +79,17 @@ } }, computed: { - ...mapState("application", ["showTimeSlider"]), + ...mapState("application", ["showTimeSlider", "paneSetup"]), ...mapState("map", ["ongoingRefresh"]), + reposition() { + // reposition time slider in case of opened diagram + if (["DEFAULT", "COMPARESURVEYS"].indexOf(this.paneSetup) === -1) { + const height = document.getElementById("main").clientHeight + 1; + return `bottom: ${height}px`; + } else { + return ""; + } + }, dateSelection: { get() { const date = this.$store.state.application.selectedTime;