Skip to content

Commit ff54cd0

Browse files
authored
Style.js lists in alphabetical order (#1428)
1 parent e1059ee commit ff54cd0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

public/modules/ui/style.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ function selectStyleElement() {
8888
styleIsOff.style.display = isLayerOff ? "block" : "none";
8989

9090
// active group element
91-
if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders", "terrs"].includes(styleElement)) {
91+
if (["anchors", "borders", "burgIcons", "coastline", "lakes", "labels", "routes", "terrs"].includes(styleElement)) {
9292
const group = styleGroupSelect.value;
9393
const defaultGroupSelector = styleElement === "terrs" ? "#landHeights" : "g";
9494
el = group && el.select("#" + group).size() ? el.select("#" + group) : el.select(defaultGroupSelector);
9595
}
9696

9797
// opacity
98-
if (!["landmass", "ocean", "regions", "legend"].includes(styleElement)) {
98+
if (!["landmass", "legend", "ocean", "regions"].includes(styleElement)) {
9999
styleOpacity.style.display = "block";
100100
styleOpacityInput.value = el.attr("opacity") || 1;
101101
}
@@ -107,7 +107,7 @@ function selectStyleElement() {
107107
}
108108

109109
// fill
110-
if (["rivers", "lakes", "landmass", "prec", "ice", "fogging", "scaleBar", "vignette"].includes(styleElement)) {
110+
if (["fogging", "ice", "lakes", "landmass", "prec", "rivers", "scaleBar", "vignette"].includes(styleElement)) {
111111
styleFill.style.display = "block";
112112
styleFillInput.value = styleFillOutput.value = el.attr("fill");
113113
}
@@ -372,7 +372,7 @@ function selectStyleElement() {
372372

373373
// update group options
374374
styleGroupSelect.options.length = 0; // remove all options
375-
if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders", "terrs"].includes(styleElement)) {
375+
if (["anchors", "borders", "burgIcons", "coastline", "lakes", "labels", "routes", "terrs"].includes(styleElement)) {
376376
const groups = ensureEl(styleElement).querySelectorAll("g");
377377
groups.forEach(el => {
378378
if (el.id === "burgLabels") return;

0 commit comments

Comments
 (0)