Mercurial > gemma
changeset 3724:05bbd1a97567
client: waterlevel diagrams: fix now lines positioning
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 20 Jun 2019 18:36:53 +0200 |
parents | 9759355d7b90 |
children | 18777f6df3ef |
files | client/src/components/gauge/HydrologicalConditions.vue client/src/components/gauge/Waterlevel.vue |
diffstat | 2 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue Thu Jun 20 18:15:57 2019 +0200 +++ b/client/src/components/gauge/HydrologicalConditions.vue Thu Jun 20 18:36:53 2019 +0200 @@ -754,12 +754,11 @@ .line() .x(d => this.scale.x(d.x)) .y(d => this.scale.y(d.y)); - const nowLabel = selection => { selection.attr( "transform", `translate(${this.scale.x(new Date())}, ${this.scale.y( - this.extent.waterlevel[1] - 16 + this.extent.waterlevel[1] )})` ); }; @@ -769,7 +768,7 @@ .append("path") .datum([ { x: new Date(), y: this.extent.waterlevel[0] }, - { x: new Date(), y: this.extent.waterlevel[1] - 20 } + { x: new Date(), y: this.extent.waterlevel[1] } ]) .attr("class", "now-line") .attr("d", nowLine); @@ -785,7 +784,7 @@ .append("path") .datum([ { x: new Date(), y: this.extent.waterlevel[0] }, - { x: new Date(), y: this.extent.waterlevel[1] - 20 } + { x: new Date(), y: this.extent.waterlevel[1] } ]) .attr("class", "now-line") .attr(
--- a/client/src/components/gauge/Waterlevel.vue Thu Jun 20 18:15:57 2019 +0200 +++ b/client/src/components/gauge/Waterlevel.vue Thu Jun 20 18:36:53 2019 +0200 @@ -866,12 +866,11 @@ .line() .x(d => this.scale.x(d.x)) .y(d => this.scale.y(d.y)); - const nowLabel = selection => { selection.attr( "transform", `translate(${this.scale.x(new Date())}, ${this.scale.y( - this.extent.waterlevel[1] - 16 + this.extent.waterlevel[1] )})` ); }; @@ -881,7 +880,7 @@ .append("path") .datum([ { x: new Date(), y: this.extent.waterlevel[0] }, - { x: new Date(), y: this.extent.waterlevel[1] - 20 } + { x: new Date(), y: this.extent.waterlevel[1] } ]) .attr("class", "now-line") .attr("d", nowLine); @@ -897,7 +896,7 @@ .append("path") .datum([ { x: new Date(), y: this.extent.waterlevel[0] }, - { x: new Date(), y: this.extent.waterlevel[1] - 20 } + { x: new Date(), y: this.extent.waterlevel[1] } ]) .attr("class", "now-line") .attr(