mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
slightly optimize onZoom
This commit is contained in:
parent
decfbc1337
commit
aab27ca673
4 changed files with 25 additions and 12 deletions
|
|
@ -167,7 +167,7 @@ optionsContent.addEventListener("change", function (event) {
|
|||
if (id === "zoomExtentMin" || id === "zoomExtentMax") changeZoomExtent(value);
|
||||
else if (id === "optionsSeed") generateMapWithSeed("seed change");
|
||||
else if (id === "uiSizeInput" || id === "uiSizeOutput") changeUIsize(value);
|
||||
if (id === "shapeRendering") viewbox.attr("shape-rendering", value);
|
||||
else if (id === "shapeRendering") setRendering(value);
|
||||
else if (id === "yearInput") changeYear();
|
||||
else if (id === "eraInput") changeEra();
|
||||
else if (id === "stateLabelsModeInput") options.stateLabelsMode = value;
|
||||
|
|
@ -543,9 +543,7 @@ function applyStoredOptions() {
|
|||
const themeColor = localStorage.getItem("themeColor");
|
||||
changeDialogsTheme(themeColor, transparency);
|
||||
|
||||
// set shape rendering
|
||||
viewbox.attr("shape-rendering", shapeRendering.value);
|
||||
|
||||
setRendering(shapeRendering.value);
|
||||
options.stateLabelsMode = stateLabelsModeInput.value;
|
||||
}
|
||||
|
||||
|
|
@ -622,6 +620,10 @@ function randomizeCultureSet() {
|
|||
changeCultureSet();
|
||||
}
|
||||
|
||||
function setRendering(value) {
|
||||
viewbox.attr("shape-rendering", value);
|
||||
}
|
||||
|
||||
// generate current year and era name
|
||||
function generateEra() {
|
||||
if (!stored("year")) yearInput.value = rand(100, 2000); // current year
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue