fix: locking options

This commit is contained in:
Azgaar 2024-09-06 02:41:14 +02:00
parent 4c6c5288a1
commit cea9b1a48a
3 changed files with 5 additions and 8 deletions

View file

@ -8081,7 +8081,7 @@
<script src="modules/ui/measurers.js?v=1.99.00"></script>
<script src="modules/ui/style-presets.js?v=1.100.00"></script>
<script src="modules/ui/general.js?v=1.103.0"></script>
<script src="modules/ui/general.js?v=1.103.5"></script>
<script src="modules/ui/options.js?v=1.100.00"></script>
<script src="main.js?v=1.100.00"></script>

View file

@ -288,7 +288,6 @@ function updateCellInfo(point, i, g) {
}
function getGeozone(latitude) {
if (latitude > 66.5) return "Arctic";
if (latitude > 35) return "Temperate North";
if (latitude > 23.5) return "Subtropical North";
@ -443,7 +442,7 @@ function highlightEmblemElement(type, el) {
// assign lock behavior
document.querySelectorAll("[data-locked]").forEach(function (e) {
e.addEventListener("mouseover", e => {
e.addEventListener("mouseover", function (e) {
e.stopPropagation();
if (this.className === "icon-lock")
tip("Click to unlock the option and allow it to be randomized on new map generation");
@ -451,11 +450,9 @@ document.querySelectorAll("[data-locked]").forEach(function (e) {
});
e.addEventListener("click", function () {
const ids = this.dataset.ids ? this.dataset.ids.split(",") : [this.id.slice(5)];
const fn = this.className === "icon-lock" ? unlock : lock;
const ids = this.dataset.ids.split(",");
if (ids.length) ids.forEach(fn);
else fn(this.id.slice(5));
ids.forEach(fn);
});
});

View file

@ -12,7 +12,7 @@
*
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
*/
const VERSION = "1.103.4";
const VERSION = "1.103.5";
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
{