Mercurial > gemma
changeset 4455:112120ed510d
removed empty catch statement
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 23 Sep 2019 09:22:03 +0200 |
parents | 69166db6ba8a |
children | acb21e7362ce 8a8c08b54f67 |
files | client/src/components/map/Map.vue |
diffstat | 1 files changed, 90 insertions(+), 92 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/Map.vue Mon Sep 23 09:19:03 2019 +0200 +++ b/client/src/components/map/Map.vue Mon Sep 23 09:22:03 2019 +0200 @@ -259,103 +259,101 @@ // load configured bottleneck colors HTTP.get("/system/settings", { headers: { "X-Gemma-Auth": localStorage.getItem("token") } - }) - .then(response => { - let btlnStrokeC = response.data.bottlenecks_stroke, - btlnFillC = response.data.bottlenecks_fill, - strFillC = response.data.stretches_fill, - strStrokeC = response.data.stretches_stroke, - secStrokeC = response.data.sections_stroke, - secFillC = response.data.sections_fill, - fwd1StrokeC = response.data.fairwaydimensionslos1_stroke, - fwd1FillC = response.data.fairwaydimensionslos1_fill, - fwd2StrokeC = response.data.fairwaydimensionslos2_stroke, - fwd2FillC = response.data.fairwaydimensionslos2_fill, - fwd3StrokeC = response.data.fairwaydimensionslos3_stroke, - fwd3FillC = response.data.fairwaydimensionslos3_fill, - wwpStokeC = response.data.waterwayprofiles_stroke; - let btlnStyle = new Style({ - stroke: new Stroke({ - color: btlnStrokeC, - width: 4 - }), - fill: new Fill({ - color: btlnFillC - }) + }).then(response => { + let btlnStrokeC = response.data.bottlenecks_stroke, + btlnFillC = response.data.bottlenecks_fill, + strFillC = response.data.stretches_fill, + strStrokeC = response.data.stretches_stroke, + secStrokeC = response.data.sections_stroke, + secFillC = response.data.sections_fill, + fwd1StrokeC = response.data.fairwaydimensionslos1_stroke, + fwd1FillC = response.data.fairwaydimensionslos1_fill, + fwd2StrokeC = response.data.fairwaydimensionslos2_stroke, + fwd2FillC = response.data.fairwaydimensionslos2_fill, + fwd3StrokeC = response.data.fairwaydimensionslos3_stroke, + fwd3FillC = response.data.fairwaydimensionslos3_fill, + wwpStokeC = response.data.waterwayprofiles_stroke; + let btlnStyle = new Style({ + stroke: new Stroke({ + color: btlnStrokeC, + width: 4 }), - strStyle = new Style({ - stroke: new Stroke({ - color: strStrokeC, - width: 2 - }), - fill: new Fill({ - color: strFillC - }) + fill: new Fill({ + color: btlnFillC + }) + }), + strStyle = new Style({ + stroke: new Stroke({ + color: strStrokeC, + width: 2 }), - secStyle = new Style({ - stroke: new Stroke({ - color: secStrokeC, - width: 5 - }), - fill: new Fill({ - color: secFillC - }) + fill: new Fill({ + color: strFillC + }) + }), + secStyle = new Style({ + stroke: new Stroke({ + color: secStrokeC, + width: 5 + }), + fill: new Fill({ + color: secFillC + }) + }), + fwd1Style = new Style({ + stroke: new Stroke({ + lineDash: [2, 4], + lineCap: "round", + color: fwd1StrokeC, + width: 2 }), - fwd1Style = new Style({ - stroke: new Stroke({ - lineDash: [2, 4], - lineCap: "round", - color: fwd1StrokeC, - width: 2 - }), - fill: new Fill({ - color: fwd1FillC - }) + fill: new Fill({ + color: fwd1FillC + }) + }), + fwd2Style = new Style({ + stroke: new Stroke({ + lineDash: [3, 6], + lineCap: "round", + color: fwd2StrokeC, + width: 2 }), - fwd2Style = new Style({ - stroke: new Stroke({ - lineDash: [3, 6], - lineCap: "round", - color: fwd2StrokeC, - width: 2 - }), - fill: new Fill({ - color: fwd2FillC - }) + fill: new Fill({ + color: fwd2FillC + }) + }), + fwd3Style = new Style({ + stroke: new Stroke({ + color: fwd3StrokeC, + width: 2 }), - fwd3Style = new Style({ - stroke: new Stroke({ - color: fwd3StrokeC, - width: 2 - }), - fill: new Fill({ - color: fwd3FillC - }) - }), - wwpStyle = new Style({ - stroke: new Stroke({ - color: wwpStokeC, - lineDash: [5, 5], - width: 2 - }) - }); - this.layers.get("WATERWAYPROFILES").setStyle(wwpStyle); - this.layers - .get("FAIRWAYDIMENSIONSLOS1") - .setStyle(() => [fwd1Style, styles.textFW1]); - this.layers - .get("FAIRWAYDIMENSIONSLOS2") - .setStyle(() => [fwd2Style, styles.textFW2]); - this.layers - .get("FAIRWAYDIMENSIONSLOS3") - .setStyle(() => [fwd3Style, styles.textFW3]); - this.layers.get("SECTIONS").setStyle(secStyle); - this.layers.get("STRETCHES").setStyle(strStyle); - this.layers.get("BOTTLENECKS").setStyle(btlnStyle); - this.$store.commit("gauges/deleteNashSutcliffeCache"); - this.$store.dispatch("map/refreshLayers"); - }) - .catch(error => {}); + fill: new Fill({ + color: fwd3FillC + }) + }), + wwpStyle = new Style({ + stroke: new Stroke({ + color: wwpStokeC, + lineDash: [5, 5], + width: 2 + }) + }); + this.layers.get("WATERWAYPROFILES").setStyle(wwpStyle); + this.layers + .get("FAIRWAYDIMENSIONSLOS1") + .setStyle(() => [fwd1Style, styles.textFW1]); + this.layers + .get("FAIRWAYDIMENSIONSLOS2") + .setStyle(() => [fwd2Style, styles.textFW2]); + this.layers + .get("FAIRWAYDIMENSIONSLOS3") + .setStyle(() => [fwd3Style, styles.textFW3]); + this.layers.get("SECTIONS").setStyle(secStyle); + this.layers.get("STRETCHES").setStyle(strStyle); + this.layers.get("BOTTLENECKS").setStyle(btlnStyle); + this.$store.commit("gauges/deleteNashSutcliffeCache"); + this.$store.dispatch("map/refreshLayers"); + }); } }, mounted() {