diff --git a/index.html b/index.html index 3c0ba0f3..0c8a1e58 100644 --- a/index.html +++ b/index.html @@ -8141,7 +8141,7 @@ - + diff --git a/modules/ui/units-editor.js b/modules/ui/units-editor.js index a30e9a7d..aa63e64a 100644 --- a/modules/ui/units-editor.js +++ b/modules/ui/units-editor.js @@ -121,11 +121,16 @@ function editUnits() { function addRuler() { if (!layerIsOn("toggleRulers")) toggleRulers(); + + const width = Math.min(graphWidth, svgWidth); + const height = Math.min(graphHeight, svgHeight); const pt = byId("map").createSVGPoint(); - (pt.x = graphWidth / 2), (pt.y = graphHeight / 4); + pt.x = width / 2; + pt.y = height / 4; const p = pt.matrixTransform(viewbox.node().getScreenCTM().inverse()); - const dx = graphWidth / 4 / scale; - const dy = (rulers.data.length * 40) % (graphHeight / 2); + + const dx = width / 4 / scale; + const dy = (rulers.data.length * 40) % (height / 2); const from = [(p.x - dx) | 0, (p.y + dy) | 0]; const to = [(p.x + dx) | 0, (p.y + dy) | 0]; rulers.create(Ruler, [from, to]).draw(); diff --git a/versioning.js b/versioning.js index a785e90e..1094599c 100644 --- a/versioning.js +++ b/versioning.js @@ -13,7 +13,7 @@ * Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2 */ -const VERSION = "1.108.11"; +const VERSION = "1.108.12"; if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function"); {