changeset 3390:8adf1fc51acd

client: spuc05: improved diagram size on map
author Markus Kottlaender <markus@intevation.de>
date Wed, 22 May 2019 16:53:31 +0200
parents 45a629a3a8b8
children 11379474a1b1
files client/src/components/map/styles.js
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/styles.js	Wed May 22 16:44:13 2019 +0200
+++ b/client/src/components/map/styles.js	Wed May 22 16:53:31 2019 +0200
@@ -192,20 +192,19 @@
       feature.get("fa_data") &&
       resolution > 15
     ) {
-      let frame = `<rect x='0' y='0' width='40' height='104' stroke-width='0' fill='white'/>`;
-      let lnwl = `<rect x='2' y='22' width='18' height='80' stroke-width='0' fill='aqua'/>`;
-      let range1 = `<rect x='20' y='2' width='18' height='10' stroke-width='0' fill='hotpink'/>`;
-      let range2 = `<rect x='20' y='12' width='18' height='30' stroke-width='0' fill='darksalmon'/>`;
-      let range3 = `<rect x='20' y='42' width='18' height='60' stroke-width='0' fill='blue'/>`;
-      let svg = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='104'><g>${frame}${lnwl}${range1}${range2}${range3}</g></svg>`;
+      let frame = `<rect x='0' y='0' width='32' height='84' stroke-width='0' fill='white'/>`;
+      let lnwl = `<rect x='2' y='22' width='10' height='60' stroke-width='0' fill='aqua'/>`;
+      let range1 = `<rect x='12' y='2' width='18' height='25' stroke-width='0' fill='hotpink'/>`;
+      let range2 = `<rect x='12' y='27' width='18' height='5' stroke-width='0' fill='darksalmon'/>`;
+      let range3 = `<rect x='12' y='32' width='18' height='50' stroke-width='0' fill='blue'/>`;
+      let svg = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='84'><g>${frame}${lnwl}${range1}${range2}${range3}</g></svg>`;
       let bnCenter = getCenter(feature.getGeometry().getExtent());
       s.push(
         new Style({
           geometry: new Point(bnCenter),
           image: new Icon({
             src: svg,
-            anchor: [1.2, 1.2],
-            scale: resolution > 100 ? 0.75 : 1
+            anchor: [1.2, 1.2]
           })
         })
       );