fix: rework texture save format

This commit is contained in:
Azgaar 2023-11-19 02:24:37 +04:00
parent 958a2c6ef8
commit a7419a299e
20 changed files with 168 additions and 169 deletions

View file

@ -178,7 +178,7 @@ function mapSizeInputChange() {
}
}
// change svg size on manual size change or window resize, do not change graph size
// change svg size on manual size change or window resize (do not change graph size!)
function changeMapSize() {
svgWidth = Math.min(+mapWidthInput.value, window.innerWidth);
svgHeight = Math.min(+mapHeightInput.value, window.innerHeight);
@ -190,12 +190,12 @@ function changeMapSize() {
[0, 0],
[maxWidth, maxHeight]
]);
landmass.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
oceanPattern.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
oceanLayers.select("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
fogging.selectAll("rect").attr("x", 0).attr("y", 0).attr("width", maxWidth).attr("height", maxHeight);
defs.select("mask#fog > rect").attr("width", maxWidth).attr("height", maxHeight);
texture.select("image").attr("width", maxWidth).attr("height", maxHeight);
fitScaleBar();
if (window.fitLegendBox) fitLegendBox();