shapeRendering option

This commit is contained in:
Azgaar 2021-07-12 23:45:10 +03:00
parent 985e3c43f9
commit 6dc8cad13e
3 changed files with 17 additions and 0 deletions

View file

@ -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

View file

@ -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')