Rescale style option for submaps.

This commit is contained in:
Mészáros Gergely 2022-04-16 22:41:42 +02:00
parent 53dc9a452d
commit e85f5e39d6

View file

@ -20,6 +20,7 @@ window.UISubmap = (function () {
$(this).dialog("close"); $(this).dialog("close");
} }
} }
}
}); });
} }
@ -38,6 +39,17 @@ window.UISubmap = (function () {
Cancel: function () { Cancel: function () {
$(this).dialog("close"); $(this).dialog("close");
} }
});
}
/* callbacks */
const resampleCurrentMap = debounce(function () {
// Resample the whole map to different cell resolution or shape
const cellNumId = Number(document.getElementById("submapPointsInput").value);
if (!cellsDensityConstants[cellNumId]) {
console.error("Unknown cell number!");
return;
} }
}); });
} }
@ -146,7 +158,8 @@ window.UISubmap = (function () {
// resize burgIcons // resize burgIcons
const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")]; const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")];
for (const bi of burgIcons) { for (const bi of burgIcons) {
const newRadius = rn(minmax(bi.getAttribute('size') * scale, 0.2, 10), 2); const newRadius = rn(minmax(scale, 0.2, 10) * 0.8, 2);
styleRadiusInput.value = newRadius;
changeRadius(newRadius, bi.id); changeRadius(newRadius, bi.id);
const swAttr = bi.attributes['stroke-width']; const swAttr = bi.attributes['stroke-width'];
swAttr.value = +swAttr.value * scale; swAttr.value = +swAttr.value * scale;
@ -186,6 +199,3 @@ window.UISubmap = (function () {
position: {my: "center", at: "center", of: "svg"} position: {my: "center", at: "center", of: "svg"}
}); });
} }
return {openSubmapOptions, openRemapOptions}
})();