diff --git a/index.html b/index.html index 597edef3..22676ba1 100644 --- a/index.html +++ b/index.html @@ -274,7 +274,7 @@
Azgaar's
Fantasy Map Generator
-
v. 1.73
+
v. 1.8

LOADING...

@@ -1727,9 +1727,9 @@

Click to create a new map:

-
- - +
+ +
@@ -4489,7 +4489,7 @@
- +
diff --git a/main.js b/main.js index 7f6b451d..5f6aac6a 100644 --- a/main.js +++ b/main.js @@ -2,7 +2,7 @@ // https://github.com/Azgaar/Fantasy-Map-Generator "use strict"; -const version = "1.732"; // generator version +const version = "1.8"; // generator version document.title += " v" + version; // switches to disable/enable logging features @@ -458,6 +458,8 @@ function showWelcomeMessage() { alertMessage.innerHTML = `The Fantasy Map Generator is updated up to version ${version}. This version is compatible with ${changelog}, loaded .map files will be auto-updated.

Join our ${discord} and ${reddit} to ask questions, share maps, discuss the Generator and Worlbuilding, report bugs and propose new features.

diff --git a/modules/ui/submap.js b/modules/ui/submap.js index 5a2223a2..67a7aa5f 100644 --- a/modules/ui/submap.js +++ b/modules/ui/submap.js @@ -87,7 +87,7 @@ window.UISubmap = (function () { rescaleStyles: checked("submapRescaleStyles"), smoothHeightMap: scale > 2, inverse: (x, y) => [x / origScale + x0, y / origScale + y0], - projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale], + projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale] }; // converting map position on the planet @@ -146,17 +146,17 @@ window.UISubmap = (function () { // resize burgIcons const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")]; for (const bi of burgIcons) { - const newRadius = rn(minmax(bi.getAttribute('size') * scale, 0.2, 10), 2); + const newRadius = rn(minmax(bi.getAttribute("size") * scale, 0.2, 10), 2); changeRadius(newRadius, bi.id); - const swAttr = bi.attributes['stroke-width']; + const swAttr = bi.attributes["stroke-width"]; swAttr.value = +swAttr.value * scale; } // burglabels - const burgLabels= [...document.getElementById("burgLabels").querySelectorAll("g")]; + const burgLabels = [...document.getElementById("burgLabels").querySelectorAll("g")]; for (const bl of burgLabels) { - const size = +bl.dataset['size']; - bl.dataset['size'] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale; + const size = +bl.dataset["size"]; + bl.dataset["size"] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale; } // emblems @@ -187,5 +187,5 @@ window.UISubmap = (function () { }); } - return {openSubmapOptions, openRemapOptions} + return {openSubmapOptions, openRemapOptions}; })(); diff --git a/modules/ui/tools.js b/modules/ui/tools.js index aec92311..8f48b260 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -72,6 +72,9 @@ toolsContent.addEventListener("click", function (event) { else if (button === "addRiver") toggleAddRiver(); else if (button === "addRoute") toggleAddRoute(); else if (button === "addMarker") toggleAddMarker(); + // click to create a new map buttons + else if (button === "openSubmapMenu") UISubmap.openSubmapOptions(); + else if (button === "openResampleMenu") UISubmap.openRemapOptions(); }); function processFeatureRegeneration(event, button) {