refactor: drawReliefIcons, v1.108.4

This commit is contained in:
Azgaar 2025-02-15 18:03:54 +01:00
parent 791347b1ee
commit 4dd34e13d1
8 changed files with 149 additions and 145 deletions

View file

@ -140,9 +140,17 @@ function selectStyleElement() {
// stroke dash
if (
["borders", "cells", "coordinates", "gridOverlay", "legend", "population", "routes", "temperature", "zones"].includes(
styleElement
)
[
"borders",
"cells",
"coordinates",
"gridOverlay",
"legend",
"population",
"routes",
"temperature",
"zones"
].includes(styleElement)
) {
styleStrokeDash.style.display = "block";
styleStrokeDasharrayInput.value = el.attr("stroke-dasharray") || "";
@ -711,19 +719,19 @@ styleHeightmapCurve.on("change", e => {
styleReliefSet.on("change", e => {
terrain.attr("set", e.target.value);
ReliefIcons.draw();
drawReliefIcons();
if (!layerIsOn("toggleRelief")) toggleRelief();
});
styleReliefSize.on("change", e => {
terrain.attr("size", e.target.value);
ReliefIcons.draw();
drawReliefIcons();
if (!layerIsOn("toggleRelief")) toggleRelief();
});
styleReliefDensity.on("change", e => {
terrain.attr("density", e.target.value);
ReliefIcons.draw();
drawReliefIcons();
if (!layerIsOn("toggleRelief")) toggleRelief();
});
@ -788,7 +796,7 @@ styleShadowInput.on("input", function () {
styleFontAdd.on("click", function () {
addFontNameInput.value = "";
addFontURLInput.value = "";
$("#addFontDialog").dialog({
title: "Add custom font",
width: "26em",