changeset 5219:de86a96d55c3 new-fwa

linter
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 12 May 2020 10:04:06 +0200
parents 7dbb7cc6dbfa
children 142ac550bd9a
files client/src/components/TimeSlider.vue client/src/components/fairway/Fairwayprofile.vue client/src/components/gauge/HydrologicalConditions.vue client/src/components/gauge/Waterlevel.vue client/src/components/layers/LegendElement.vue client/src/store/gauges.js
diffstat 6 files changed, 52 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/TimeSlider.vue	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/components/TimeSlider.vue	Tue May 12 10:04:06 2020 +0200
@@ -257,7 +257,10 @@
       zoom = d3
         .zoom()
         .scaleExtent([0.8, 102000])
-        .translateExtent([[0, 0], [svgWidth, svgHeight]])
+        .translateExtent([
+          [0, 0],
+          [svgWidth, svgHeight]
+        ])
         .extent([[0, 0], [(svgWidth, svgHeight)]])
         .on("zoom", this.zoomed);
 
--- a/client/src/components/fairway/Fairwayprofile.vue	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/components/fairway/Fairwayprofile.vue	Tue May 12 10:04:06 2020 +0200
@@ -791,7 +791,10 @@
         });
       graph
         .append("path")
-        .datum([{ x: 0, y: 0 }, { x: this.totalLength, y: 0 }])
+        .datum([
+          { x: 0, y: 0 },
+          { x: this.totalLength, y: 0 }
+        ])
         .attr("fill-opacity", 0.65)
         .attr("fill", WATER_COLOR)
         .attr("stroke", "transparent")
--- a/client/src/components/gauge/HydrologicalConditions.vue	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/components/gauge/HydrologicalConditions.vue	Tue May 12 10:04:06 2020 +0200
@@ -450,9 +450,7 @@
         .attr("class", "main")
         .attr(
           "transform",
-          `translate(${dimensions.mainMargin.left}, ${
-            dimensions.mainMargin.top
-          })`
+          `translate(${dimensions.mainMargin.left}, ${dimensions.mainMargin.top})`
         );
 
       // create container for navigation diagram
@@ -519,9 +517,7 @@
         .attr("height", dimensions.mainHeight)
         .attr(
           "transform",
-          `translate(${dimensions.mainMargin.left}, ${
-            dimensions.mainMargin.top
-          })`
+          `translate(${dimensions.mainMargin.left}, ${dimensions.mainMargin.top})`
         );
 
       this.createZoom({
@@ -890,13 +886,22 @@
       const brush = d3
         .brushX()
         .handleSize(4)
-        .extent([[0, 0], [dimensions.width, dimensions.navHeight]]);
+        .extent([
+          [0, 0],
+          [dimensions.width, dimensions.navHeight]
+        ]);
 
       const zoom = d3
         .zoom()
         .scaleExtent([1, Infinity])
-        .translateExtent([[0, 0], [dimensions.width, dimensions.mainHeight]])
-        .extent([[0, 0], [dimensions.width, dimensions.mainHeight]]);
+        .translateExtent([
+          [0, 0],
+          [dimensions.width, dimensions.mainHeight]
+        ])
+        .extent([
+          [0, 0],
+          [dimensions.width, dimensions.mainHeight]
+        ]);
 
       brush.on("brush end", () => {
         if (d3.event.sourceEvent && d3.event.sourceEvent.type === "zoom")
--- a/client/src/components/gauge/Waterlevel.vue	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/components/gauge/Waterlevel.vue	Tue May 12 10:04:06 2020 +0200
@@ -465,9 +465,7 @@
         .attr("class", "main")
         .attr(
           "transform",
-          `translate(${dimensions.mainMargin.left}, ${
-            dimensions.mainMargin.top
-          })`
+          `translate(${dimensions.mainMargin.left}, ${dimensions.mainMargin.top})`
         );
 
       // create container for navigation diagram
@@ -531,9 +529,7 @@
         .attr("height", dimensions.mainHeight)
         .attr(
           "transform",
-          `translate(${dimensions.mainMargin.left}, ${
-            dimensions.mainMargin.top
-          })`
+          `translate(${dimensions.mainMargin.left}, ${dimensions.mainMargin.top})`
         );
 
       this.createZoom({
@@ -851,7 +847,10 @@
       // draw in nav
       navigation
         .append("path")
-        .datum([{ x: new Date(), y: hi + dy }, { x: new Date(), y: lo - dy }])
+        .datum([
+          { x: new Date(), y: hi + dy },
+          { x: new Date(), y: lo - dy }
+        ])
         .attr("class", "now-line")
         .attr(
           "d",
@@ -1033,13 +1032,22 @@
       const brush = d3
         .brushX()
         .handleSize(4)
-        .extent([[0, 0], [dimensions.width, dimensions.navHeight]]);
+        .extent([
+          [0, 0],
+          [dimensions.width, dimensions.navHeight]
+        ]);
 
       const zoom = d3
         .zoom()
         .scaleExtent([1, Infinity])
-        .translateExtent([[0, 0], [dimensions.width, dimensions.mainHeight]])
-        .extent([[0, 0], [dimensions.width, dimensions.mainHeight]]);
+        .translateExtent([
+          [0, 0],
+          [dimensions.width, dimensions.mainHeight]
+        ])
+        .extent([
+          [0, 0],
+          [dimensions.width, dimensions.mainHeight]
+        ]);
 
       brush.on("brush end", () => {
         if (d3.event.sourceEvent && d3.event.sourceEvent.type === "zoom")
--- a/client/src/components/layers/LegendElement.vue	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/components/layers/LegendElement.vue	Tue May 12 10:04:06 2020 +0200
@@ -174,7 +174,12 @@
       if (this.layer.get("id") === "BOTTLENECKS") {
         feature = new Feature({
           geometry: new Polygon([
-            [[-1.7, -1.2], [-1.7, 0.5], [1.7, 1.2], [1.7, -0.5]]
+            [
+              [-1.7, -1.2],
+              [-1.7, 0.5],
+              [1.7, 1.2],
+              [1.7, -0.5]
+            ]
           ])
         });
         if (typeof mapStyle === "function") {
@@ -192,7 +197,11 @@
         });
       } else {
         feature = new Feature({
-          geometry: new LineString([[-1, -1], [0, 0], [1, 1]])
+          geometry: new LineString([
+            [-1, -1],
+            [0, 0],
+            [1, 1]
+          ])
         });
       }
       // special case if we need to call the style function with a special
--- a/client/src/store/gauges.js	Mon May 11 20:10:15 2020 +0200
+++ b/client/src/store/gauges.js	Tue May 12 10:04:06 2020 +0200
@@ -265,9 +265,7 @@
     loadYearWaterlevels({ state, commit }) {
       return new Promise((resolve, reject) => {
         HTTP.get(
-          `/data/year-waterlevels/${state.selectedGaugeISRS}/${
-            state.yearCompare
-          }`,
+          `/data/year-waterlevels/${state.selectedGaugeISRS}/${state.yearCompare}`,
           {
             headers: { "X-Gemma-Auth": localStorage.getItem("token") }
           }