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>
|
||||
</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">
|
||||
<td></td>
|
||||
<td>Language</td>
|
||||
|
|
|
|||
|
|
@ -804,6 +804,7 @@ function parseLoadedData(data) {
|
|||
// set options
|
||||
yearInput.value = options.year;
|
||||
eraInput.value = options.era;
|
||||
shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision";
|
||||
|
||||
if (window.restoreDefaultEvents) restoreDefaultEvents();
|
||||
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);
|
||||
else if (id === "optionsSeed") generateMapWithSeed();
|
||||
else if (id === "uiSizeInput" || id === "uiSizeOutput") changeUIsize(value);
|
||||
if (id === "shapeRendering") viewbox.attr("shape-rendering", value);
|
||||
else if (id === "yearInput") changeYear();
|
||||
else if (id === "eraInput") changeEra();
|
||||
});
|
||||
|
|
@ -494,6 +495,9 @@ function applyStoredOptions() {
|
|||
const height = +params.get("height");
|
||||
if (width) mapWidthInput.value = width;
|
||||
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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue