mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
shapeRendering option
This commit is contained in:
parent
985e3c43f9
commit
6dc8cad13e
3 changed files with 17 additions and 0 deletions
12
index.html
12
index.html
|
|
@ -1278,6 +1278,18 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr data-tip="Select shape rendering model">
|
||||||
|
<td></td>
|
||||||
|
<td>Shape rendering</td>
|
||||||
|
<td>
|
||||||
|
<select id="shapeRendering" data-stored="shapeRendering">
|
||||||
|
<option value="geometricPrecision" selected>Best quality</option>
|
||||||
|
<option value="optimizeSpeed">Best performace</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<!-- <tr data-tip="Select language (not all languages are fully supported). Reload the page to apply">
|
<!-- <tr data-tip="Select language (not all languages are fully supported). Reload the page to apply">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>Language</td>
|
<td>Language</td>
|
||||||
|
|
|
||||||
|
|
@ -804,6 +804,7 @@ function parseLoadedData(data) {
|
||||||
// set options
|
// set options
|
||||||
yearInput.value = options.year;
|
yearInput.value = options.year;
|
||||||
eraInput.value = options.era;
|
eraInput.value = options.era;
|
||||||
|
shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision";
|
||||||
|
|
||||||
if (window.restoreDefaultEvents) restoreDefaultEvents();
|
if (window.restoreDefaultEvents) restoreDefaultEvents();
|
||||||
focusOn(); // based on searchParams focus on point, cell or burg
|
focusOn(); // based on searchParams focus on point, cell or burg
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ optionsContent.addEventListener("change", function (event) {
|
||||||
if (id === "zoomExtentMin" || id === "zoomExtentMax") changeZoomExtent(value);
|
if (id === "zoomExtentMin" || id === "zoomExtentMax") changeZoomExtent(value);
|
||||||
else if (id === "optionsSeed") generateMapWithSeed();
|
else if (id === "optionsSeed") generateMapWithSeed();
|
||||||
else if (id === "uiSizeInput" || id === "uiSizeOutput") changeUIsize(value);
|
else if (id === "uiSizeInput" || id === "uiSizeOutput") changeUIsize(value);
|
||||||
|
if (id === "shapeRendering") viewbox.attr("shape-rendering", value);
|
||||||
else if (id === "yearInput") changeYear();
|
else if (id === "yearInput") changeYear();
|
||||||
else if (id === "eraInput") changeEra();
|
else if (id === "eraInput") changeEra();
|
||||||
});
|
});
|
||||||
|
|
@ -494,6 +495,9 @@ function applyStoredOptions() {
|
||||||
const height = +params.get("height");
|
const height = +params.get("height");
|
||||||
if (width) mapWidthInput.value = width;
|
if (width) mapWidthInput.value = width;
|
||||||
if (height) mapHeightInput.value = height;
|
if (height) mapHeightInput.value = height;
|
||||||
|
|
||||||
|
// set shape rendering
|
||||||
|
viewbox.attr("shape-rendering", shapeRendering.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// randomize options if randomization is allowed (not locked or options='default')
|
// randomize options if randomization is allowed (not locked or options='default')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue