Mercurial > gemma
changeset 5166:bc7855cfb801
timeslider: respect hour by reverting cursor to now while dragging in future area
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Mon, 06 Apr 2020 15:09:20 +0200 |
parents | 78086edb682a |
children | a5fd84c4f2fe |
files | client/src/components/TimeSlider.vue |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue Mon Apr 06 12:22:04 2020 +0200 +++ b/client/src/components/TimeSlider.vue Mon Apr 06 15:09:20 2020 +0200 @@ -398,8 +398,12 @@ ); } else { if (this.selectedTime > now) { + this.isSelectedTimeHourly = true; this.selectedTime = now; d3.select(".line").attr("x", xAxis.scale()(d3.isoParse(now))); + const isHourly = currentScaleFactor > 400; + if (this.isSelectedTimeHourly != isHourly) + this.isSelectedTimeHourly = isHourly; } else { d3.select(".line").attr("x", d3.event.x); }