From fd385fd76d41bb5396e52e6ff12e9dfd026cbee6 Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Mon, 4 Oct 2021 23:16:44 +0200 Subject: [PATCH] improved zone names in SVG map added tag around custom attributes in the description fixed SVG dimensions in HTML document --- assets/climate-zones-map.svg | 58 ++++++++++++++++++---------- simulator/data/climate-zones-map.svg | 50 ++++++++++++++++-------- simulator/tools/embed.js | 4 +- simulator/www/simulator.html | 4 +- 4 files changed, 74 insertions(+), 42 deletions(-) diff --git a/assets/climate-zones-map.svg b/assets/climate-zones-map.svg index 4cf57b4..186a4d5 100644 --- a/assets/climate-zones-map.svg +++ b/assets/climate-zones-map.svg @@ -143,9 +143,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="2.0000002" - inkscape:cx="233.04556" - inkscape:cy="285.65611" + inkscape:zoom="1.4142137" + inkscape:cx="504.92555" + inkscape:cy="263.2274" inkscape:document-units="px" inkscape:current-layer="layer10" inkscape:window-width="1920" @@ -168,7 +168,7 @@ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - + @@ -209,7 +209,9 @@ inkscape:label="H3" d="m 300.5,468.65625 -4.25,2.28125 0.34375,2.5 H 278.0625 l 0.15625,3.34375 1.9375,2.84375 -7.9375,3.875 -0.84375,-0.5 -6.53125,0.46875 -0.8125,1.65625 -3.3125,0.84375 -2.21875,1.9375 -6.0625,1.40625 0.34375,2.0625 2.9375,2.75 5.84375,1.5625 0.1875,3.5 3.125,2.75 2.34375,-0.40625 3.34375,-4.09375 4.09375,-0.78125 6.4375,2.15625 5.46875,4.6875 1.5625,-1.96875 h 1.375 l 1.375,0.96875 1.15625,-0.5625 0.1875,-2.75 5.875,-1.375 1.9375,-2.53125 2.9375,-0.96875 h 4.09375 l 2.5625,2.71875 3.125,0.21875 v -3.125 l -1.5625,-2.15625 -2.75,-1.1875 -0.4375,-17.0625 -2.5625,-1.1875 z m 35,-60.28125 -2.65625,3.34375 h -1.75 l -1.0625,3.71875 h -2.125 l -0.71875,-1.59375 h -1.40625 l -1.0625,0.90625 -1.25,-0.71875 v -1.59375 l -2.8125,-0.96875 V 412.5 l -3.3125,0.53125 -1.65625,1.40625 0.53125,3.3125 h -3.03125 l -3.03125,-1.65625 H 308.5 v 1.9375 l 0.28125,5.78125 h -3.3125 -1.65625 l -1.125,2.21875 -7.1875,2.46875 -2.75,-1.90625 -1.65625,2.46875 -0.8125,2.75 3.03125,2.78125 -1.125,3.59375 L 288,439.5 l 0.84375,2.28125 -1.78125,2.125 1.0625,2.46875 2.125,1.59375 2.46875,-1.59375 1.78125,3.71875 3.6875,-1.25 0.1875,-3.53125 h 2.46875 l -0.53125,-2.125 1.0625,-0.53125 0.375,3 2.09375,1.25 1.78125,-0.1875 2.3125,3.375 2.46875,0.1875 0.875,2.8125 2.5,0.0937 0.125,-1.0625 7.03125,-2.15625 0.78125,-1.75 5.46875,-0.1875 1.75,-2.15625 10.5625,-8.40625 6.625,-4.6875 2.6875,0.1875 2.40625,-2.15625 3.71875,-2.125 v -2.625 l -2.125,-4.96875 -5.8125,-3.53125 -1.25,-2.125 -3.34375,-1.75 -1.96875,1.0625 -1.21875,-1.4375 -0.53125,-4.59375 z m -61.25,30.09375 -0.28125,3.59375 -3.59375,-1.125 H 266.5 l 0.28125,-1.375 -1.9375,0.28125 -4.125,1.375 -1.375,-2.5 -2.78125,2.5 0.84375,1.9375 -3.0625,1.375 -0.53125,3.03125 -2.5,1.125 2.21875,2.46875 -0.5625,1.65625 9.6875,4.6875 0.8125,6.65625 V 467.75 l 0.5625,4.6875 h -4.96875 l -1.375,1.9375 6.34375,5.25 3.59375,-1.9375 4.40625,5.25 -0.65625,0.0625 0.84375,0.5 7.9375,-3.875 -1.9375,-2.84375 -0.15625,-3.34375 h 18.53125 l -0.34375,-2.5 4.25,-2.28125 4.9375,3.875 2.5625,1.1875 -0.15625,-5.59375 0.21875,-6.4375 -2.34375,0.1875 -1.96875,-2.90625 1.5625,-2.5625 3.3125,3.125 2.9375,-2.34375 1.96875,-1.9375 0.25,-2.0625 -2.5,-0.0937 -0.875,-2.8125 -2.46875,-0.1875 -2.3125,-3.375 -1.78125,0.1875 -2.09375,-1.25 -0.375,-3 -1.0625,0.53125 0.53125,2.125 H 298.375 l -0.1875,3.53125 -3.6875,1.25 -1.78125,-3.71875 -2.46875,1.59375 -2.125,-1.59375 -1.0625,-2.46875 1.78125,-2.125 L 288,439.5 l -0.21875,0.0625 h -5.8125 l -6.0625,-1.09375 z m 71.9375,-57.4375 -0.96875,1.875 -1.21875,1.0625 -2.3125,0.375 2.8125,3 v 4.0625 l 1.25,0.34375 -1.40625,1.59375 v 3 l -2.3125,3.53125 -5.125,-0.53125 -3,-2.8125 -2.125,0.53125 0.71875,1.75 -0.875,1.25 -5.15625,1.0625 -6.03125,-4.03125 -1.15625,1.03125 v 2.78125 l -2.21875,0.53125 0.5625,2.21875 2.75,0.5625 h 3.03125 l 0.84375,3.84375 -3.59375,1.65625 v 1.75 l 2.8125,0.96875 v 1.59375 l 1.25,0.71875 1.0625,-0.90625 h 1.40625 l 0.71875,1.59375 h 2.125 l 1.0625,-3.71875 h 1.75 L 335.5,408.375 l 3.1875,0.34375 0.53125,4.59375 1.21875,1.4375 1.96875,-1.0625 3.34375,1.75 1.25,2.125 5.8125,3.53125 2.125,4.96875 v 2.625 l -3.71875,2.125 -2.40625,2.15625 3,0.21875 v 3.90625 l 4.46875,-0.21875 2.40625,0.125 1.75,-4.0625 6.34375,-3.875 -1.375,-1.9375 1.65625,-4.40625 5.78125,0.8125 1.40625,-10.5 7.71875,-4.40625 v -2.5 l -5.8125,-5.78125 v -4.4375 l -3.3125,-5.5 -6.90625,-3.875 -0.53125,3.03125 -2.78125,0.28125 -0.8125,-3.03125 -2.78125,0.53125 -0.53125,3.875 -2.21875,-0.8125 -4.6875,-3.0625 -2.21875,1.125 v -5.53125 z m 117.71875,0.84375 -0.40625,0.15625 -2.65625,1.40625 -0.1875,2.46875 -1.9375,1.59375 -1.0625,2.5 -0.71875,4.59375 2.125,3.15625 0.1875,2.65625 1.21875,0.375 3.5625,3.34375 3.34375,3 -1.40625,0.90625 -2.125,-1.4375 -2.65625,1.4375 -0.71875,0.875 h -2.8125 L 458,410.3125 l -0.875,1.0625 0.71875,1.78125 -2.3125,1.40625 0.875,2.125 2.3125,0.15625 2.28125,1.0625 0.375,3.71875 2.125,2.125 h 1.21875 l 2.3125,0.875 0.34375,1.96875 -1.40625,1.21875 1.0625,1.0625 v 1.25 l 2.1875,2.25 0.15625,-0.1875 0.1875,-4.46875 3.90625,0.78125 1.375,-1.78125 1.96875,0.40625 0.1875,-6.0625 4.5,-0.375 3.90625,-3.53125 h 3.5 l 0.1875,-2.15625 3.53125,-2.125 -1.96875,-4.5 2.9375,-2.53125 -0.59375,-2.9375 4.3125,-1.375 1.15625,-4.28125 -0.5625,-2.9375 -1,-1.75 L 496.125,390 l -2.90625,0.21875 -9.1875,3.3125 h -2.9375 l -5.0625,-4.09375 -5.09375,-1.375 H 468 v -3.53125 L 463.90625,382 Z m -6.125,31.3125 -2.96875,0.125 -1.40625,1.4375 -5.3125,-0.1875 -4.59375,3.34375 -3.15625,-2.125 -4.96875,1.59375 -0.875,1.78125 -3.53125,2.65625 -6.375,-4.25 -5.15625,1.6875 -0.25,1.375 0.0937,-0.0625 3.1875,2.125 -4.25,2.84375 -1.75,3.53125 2.125,1.75 -0.1875,3.71875 3.375,3.1875 -0.9062,0.71875 L 417,438.25 v 1.40625 l 1.75,0.875 v 0.53125 l -1.59375,1.4375 0.90625,1.0625 h 1.40625 l 1.40625,1.40625 0.1875,1.0625 -1.78125,1.0625 -1.40625,1.59375 -0.1875,3.875 0.53125,0.71875 3.5,1.5625 0.96875,3.90625 2.15625,0.40625 1.96875,-1.375 3.5,-2.15625 6.0625,0.59375 -0.1875,1.5625 -1.96875,0.96875 4.6875,0.21875 -1.15625,-1.1875 -0.40625,-2.53125 2.53125,-1.75 2.9375,0.96875 1.1875,0.375 0.96875,1.1875 1.375,-0.96875 0.375,-2.5625 1.5625,-1.34375 h 4.09375 l 1.1875,-1.78125 2.71875,0.78125 3.125,-1.34375 v -5.09375 l -4.09375,0.1875 3.125,-1.9375 1.5625,-2.15625 0.40625,-3.125 5.65625,-0.78125 3.15625,-3.53125 -2.1875,-2.25 v -1.25 l -1.0625,-1.0625 1.40625,-1.21875 -0.34375,-1.96875 -2.3125,-0.875 H 463.5 l -2.125,-2.125 -0.375,-3.71875 -2.28125,-1.0625 -2.3125,-0.15625 -0.875,-2.125 z m -78.0625,-3.28125 -5.46875,3.125 -1.40625,10.5 -5.78125,-0.8125 -1.65625,4.40625 1.375,1.9375 -6.34375,3.875 -1.75,4.0625 6.1875,0.28125 8.21875,0.59375 1.5625,1.5625 h -2.9375 l -1.9375,3.3125 8.375,1.75 6.65625,-1.15625 -3.53125,-3.34375 2.34375,-1.9375 3.71875,1.5625 1.75,3.71875 11.15625,0.1875 2.90625,-1.1875 0.59375,1.78125 -3.125,2.71875 4.3125,0.1875 -0.78125,1.96875 -1.1875,1.375 h 9.5625 l 4.6875,1.5625 0.46875,0.625 0.1875,-3.875 1.40625,-1.59375 1.78125,-1.0625 -0.1875,-1.0625 -1.40625,-1.40625 H 418.0625 L 417.15625,442.5 418.75,441.0625 v -0.53125 l -1.75,-0.875 V 438.25 l 3.875,0.1875 0.90625,-0.71875 -3.375,-3.1875 0.1875,-3.71875 -2.125,-1.75 1.75,-3.53125 4.25,-2.84375 -3.1875,-2.125 -2.28125,1.78125 -5.3125,1.21875 -4.25,-0.53125 -7.59375,-3.15625 -4.59375,0.15625 -3.875,-1.75 -1.4375,-1.96875 -3,-3.34375 -7.0625,-3 z m 189.19447,42.81588 -2.9375,1.96875 0.40625,1.9375 1.5625,1.96875 -1.75,1.34375 0.78125,1.5625 -1.1875,1.375 v 1.75 l 1.96875,1.78125 v 2.71875 l -1.1875,2.53125 -1.34375,0.59375 -1.5625,-2.15625 -2.75,0.21875 -0.59375,-0.40625 h -2.34375 l -2.125,1.96875 -0.8125,3.3125 -5.0625,0.96875 -3.90625,3.3125 -0.78125,2.15625 -1.9375,-0.1875 -1,-1.1875 -0.5625,3.34375 -1.375,0.5625 -0.40625,3.125 0.59375,1.375 -2.15625,1.5625 -0.59375,1.5625 2.1875,0.40625 0.375,1.0625 h 3.875 l 1.0625,0.6875 2.84375,-0.53125 1.21875,0.71875 -0.53125,0.875 1.9375,2.65625 h 3.71875 l 0.90625,2.65625 h 2.625 l -0.15625,1.59375 2.125,2.65625 1.0625,0.53125 1.40625,0.875 v 3.375 l 1.0625,0.875 h 2.125 l 0.53125,0.875 0.34375,4.78125 1.25,0.875 -0.53125,0.71875 0.34375,2.8125 4.0625,-0.15625 3.40625,-2.25 -0.125,-5.78125 4.6875,-6.625 v -10.9375 l -1.9375,-3.71875 -0.59375,-11.71875 -1.375,-2.15625 -2.53125,-1.9375 -0.40625,-7.25 1.1875,-3.3125 -1.5625,-5.28125 -0.96875,-4.28125 -0.8125,-1.1875 z m -32.625,39.0625 v 2.15625 l 1.96875,1.375 3.3125,1.9375 0.21875,1.5625 -1.96875,0.59375 -3.125,0.59375 v 1.34375 l 1.15625,1.1875 0.21875,3.90625 4.28125,1.375 1.5625,0.375 1.375,2.15625 -0.96875,1.375 -1.5625,0.5625 -1.1875,2.15625 -1.15625,1.375 0.5625,3.5 2.9375,-0.1875 0.78125,0.59375 2.75,-1.375 0.78125,0.78125 -1.375,2.9375 1.375,1.375 -2.34375,1.75 -1.5625,3.5 4.28125,1 6.0625,0.5625 -2.53125,2.9375 c 0,0 -1.18933,-0.45881 -1.71875,-0.21875 -0.0157,0.008 -0.0481,0.0222 -0.0625,0.0312 -0.005,0.003 -0.0269,0.0278 -0.0312,0.0312 -0.004,0.004 -0.0272,0.0274 -0.0312,0.0312 -0.004,0.004 -0.0277,0.0269 -0.0312,0.0312 -0.007,0.009 -0.0253,0.0215 -0.0312,0.0312 -0.003,0.005 0.003,0.026 0,0.0312 -0.005,0.0108 -0.0273,0.0509 -0.0312,0.0625 -0.002,0.006 0.002,0.0251 0,0.0312 -0.003,0.0128 -0.0294,0.0489 -0.0312,0.0625 -10e-4,0.014 4.7e-4,0.0477 0,0.0625 1e-5,0.97656 -1.34375,3.34375 -1.34375,3.34375 l 1.9375,2.125 3.53125,2.15625 6.625,1.75 1.9375,0.78125 1.78125,0.78125 -1.1875,2.15625 3.125,-0.1875 0.59375,1.375 h 3.125 l 0.78125,-3.71875 -1.96875,-0.40625 2.75,-2.90625 -0.96875,-1 0.1875,-1.75 3.53125,-1.9375 0.1875,-2.15625 -2.34375,-0.1875 -1.5625,1.34375 v -1.9375 l 3.125,-0.1875 0.96875,-2.34375 0.78125,-6.84375 -0.59375,-2.9375 -0.0625,-2.8125 -3.40625,2.25 -4.0625,0.15625 -0.34375,-2.8125 0.53125,-0.71875 -1.25,-0.875 -0.34375,-4.78125 -0.53125,-0.875 h -2.125 l -1.0625,-0.875 v -3.375 l -1.40625,-0.875 -1.0625,-0.53125 -2.125,-2.65625 0.15625,-1.59375 h -2.625 l -0.90625,-2.65625 h -3.71875 l -1.9375,-2.65625 0.53125,-0.875 -1.21875,-0.71875 -2.84375,0.53125 -1.0625,-0.6875 h -3.875 l -0.375,-1.0625 -2.1875,-0.40625 z"> class="climate-zone" + id="desc2585"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2581"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2583"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2577"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2579"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2575"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc1591"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2573"><attributes> +class="climate-zone" +</attributes> H2a + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:18.6667px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill:#ffffff;fill-opacity:1;">H2a H2b H1a H1b H1c H2c H2d class="climate-zone" + id="desc2585"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2581"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2583"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2577"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2579"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2575"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc1591"><attributes> +class="climate-zone" +</attributes> class="climate-zone" + id="desc2573"><attributes> +class="climate-zone" +</attributes> H2a + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:18.6667px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill:#ffffff;fill-opacity:1;">H2a H2b H1a H1b H1c H2c H2d ]*>[\r\n]*/g, ''); data = data.replace(/<\/svg>[\r\n]*/g, ''); - data = data.replace(/>\s*]*>/g, ' '); - data = data.replace(/<\/desc>/g, '>'); + data = data.replace(/>\s*]*><attributes>/g, ' '); + data = data.replace(/<\/attributes><\/desc>/g, '>'); data = data.replace(/"/g, '"'); data = "(window)['"+src.replace(/^.*[\\\/]/, '')+"'] = `" + data + "`;"; diff --git a/simulator/www/simulator.html b/simulator/www/simulator.html index f639def..54d79d1 100644 --- a/simulator/www/simulator.html +++ b/simulator/www/simulator.html @@ -120,7 +120,7 @@