From a06e55d61886ffd882dbfa3fb14f7ff5461b5e2f Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 8 May 2022 19:22:15 +0300 Subject: [PATCH] annotate template strings for syntax hightlight and format --- modules/io/auto-update.js | 4 ++-- modules/ui/heightmap-editor.js | 2 +- modules/ui/world-configurator.js | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/io/auto-update.js b/modules/io/auto-update.js index 064af0ad..08b9c056 100644 --- a/modules/io/auto-update.js +++ b/modules/io/auto-update.js @@ -69,7 +69,7 @@ export function resolveVersionConflicts(version) { labels.selectAll("textPath").each(function () { const text = this.textContent; const shift = this.getComputedTextLength() / -1.5; - this.innerHTML = `${text}`; + this.innerHTML = /* html */ `${text}`; }); // v1.0 added new biome - Wetland @@ -362,7 +362,7 @@ export function resolveVersionConflicts(version) { const pattern = document.getElementById("oceanic"); const filter = pattern.firstElementChild.getAttribute("filter"); const href = filter ? "./images/" + filter.replace("url(#", "").replace(")", "") + ".png" : ""; - pattern.innerHTML = ``; + pattern.innerHTML = /* html */ ``; } if (version < 1.62) { diff --git a/modules/ui/heightmap-editor.js b/modules/ui/heightmap-editor.js index d7146da2..4fc7cdbe 100644 --- a/modules/ui/heightmap-editor.js +++ b/modules/ui/heightmap-editor.js @@ -124,7 +124,7 @@ function editHeightmap(options) { heightmapInfoX.innerHTML = rn(x); heightmapInfoY.innerHTML = rn(y); heightmapInfoCell.innerHTML = cell; - heightmapInfoHeight.innerHTML = `${grid.cells.h[cell]} (${getHeight(grid.cells.h[cell])})`; + heightmapInfoHeight.innerHTML = /* html */ `${grid.cells.h[cell]} (${getHeight(grid.cells.h[cell])})`; if (tooltip.dataset.main) showMainTip(); // move radius circle if drag mode is active diff --git a/modules/ui/world-configurator.js b/modules/ui/world-configurator.js index 73a3621e..2cbef0ca 100644 --- a/modules/ui/world-configurator.js +++ b/modules/ui/world-configurator.js @@ -77,12 +77,12 @@ function editWorld() { const scale = +distanceScaleInput.value; const unit = distanceUnitInput.value; const meridian = toKilometer(eqD * 2 * scale); - document.getElementById("mapSize").innerHTML = `${graphWidth}x${graphHeight}`; - document.getElementById("mapSizeFriendly").innerHTML = `${rn(graphWidth * scale)}x${rn(graphHeight * scale)} ${unit}`; + document.getElementById("mapSize").innerHTML = /* html */ `${graphWidth}x${graphHeight}`; + document.getElementById("mapSizeFriendly").innerHTML = /* html */ `${rn(graphWidth * scale)}x${rn(graphHeight * scale)} ${unit}`; document.getElementById("meridianLength").innerHTML = rn(eqD * 2); - document.getElementById("meridianLengthFriendly").innerHTML = `${rn(eqD * 2 * scale)} ${unit}`; + document.getElementById("meridianLengthFriendly").innerHTML = /* html */ `${rn(eqD * 2 * scale)} ${unit}`; document.getElementById("meridianLengthEarth").innerHTML = meridian ? " = " + rn(meridian / 200) + "%🌏" : ""; - document.getElementById("mapCoordinates").innerHTML = `${lat(mc.latN)} ${Math.abs(rn(mc.lonW))}°W; ${lat(mc.latS)} ${rn(mc.lonE)}°E`; + document.getElementById("mapCoordinates").innerHTML = /* html */ `${lat(mc.latN)} ${Math.abs(rn(mc.lonW))}°W; ${lat(mc.latS)} ${rn(mc.lonE)}°E`; function toKilometer(v) { if (unit === "km") return v;