# HG changeset patch # User Thomas Junk # Date 1567000486 -7200 # Node ID e4ff09ebc2c3e421ec211632485ded09d0d848c1 # Parent 9abb63b6b80acefa15eeecc558bf7cce5f172412 Legend: distancemarks axis reload diff -r 9abb63b6b80a -r e4ff09ebc2c3 client/src/components/layers/LegendElement.vue --- a/client/src/components/layers/LegendElement.vue Wed Aug 28 14:31:19 2019 +0200 +++ b/client/src/components/layers/LegendElement.vue Wed Aug 28 15:54:46 2019 +0200 @@ -48,9 +48,9 @@ return this.layer.getType() === "VECTOR"; }, imgSrc() { - if (this.layer.get("id") === "DISTANCEMARKSAXIS") { - return require("@/assets/distancemarks-axis.png"); - } + // if (this.layer.get("id") === "DISTANCEMARKSAXIS") { + // return require("@/assets/distancemarks-axis.png"); + // } return this.src; }, id() { @@ -106,10 +106,18 @@ // TODO: Do something useful? return; } - this.url = - `/internal/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=` + - this.layer.getSource().getParams().LAYERS + - `&legend_options=columns:4;fontAntiAliasing:true`; + if (this.layer.get("id") !== "DISTANCEMARKSAXIS") { + this.url = + `/internal/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=` + + this.layer.getSource().getParams().LAYERS + + `&legend_options=columns:4;fontAntiAliasing:true`; + } else { + this.url = + `/internal/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=` + + this.layer.getSource().getParams().LAYERS + + `&legend_options=columns:1;fontAntiAliasing:true;forceLabels:off`; + } + this.loadImageSrc(); } }, @@ -187,5 +195,6 @@ .legendelement { max-height: 1.5rem; width: 2rem; + overflow: hidden; }