Mercurial > gemma
changeset 5057:abe3a70526a6 time-sliding
fix accidental deletion of current input
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 06 Mar 2020 13:30:10 +0100 |
parents | 2e6f73726879 |
children | e916651d3f93 |
files | client/src/components/TimeSlider.vue |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue Fri Mar 06 12:45:28 2020 +0100 +++ b/client/src/components/TimeSlider.vue Fri Mar 06 13:30:10 2020 +0100 @@ -36,10 +36,10 @@ #slider position: absolute bottom: 0 - min-width: 100vw; + min-width: 100vw &.expanded - max-height: 100%; - max-width: 100%; + max-height: 100% + max-width: 100% margin: 0 </style> <script> @@ -86,6 +86,7 @@ return format(date, "YYYY-MM-DD"); }, set(value) { + if (!value) return; const date = new Date(value); this.$store.commit("application/setSelectedTime", date); zoom.translateTo( @@ -102,6 +103,7 @@ return format(time, "HH:mm"); }, set(value) { + if (!value) return; let date = this.selectedTime; date = setHours(date, value.split(":")[0]); date = setMinutes(date, value.split(":")[1]);