mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
fix: rescale water mask on screen size change
This commit is contained in:
parent
e4064f249b
commit
09ee0c0769
1 changed files with 2 additions and 0 deletions
|
|
@ -186,6 +186,7 @@ function changeMapSize() {
|
|||
|
||||
const maxWidth = Math.max(+mapWidthInput.value, graphWidth);
|
||||
const maxHeight = Math.max(+mapHeightInput.value, graphHeight);
|
||||
|
||||
zoom.translateExtent([
|
||||
[0, 0],
|
||||
[maxWidth, maxHeight]
|
||||
|
|
@ -196,6 +197,7 @@ function changeMapSize() {
|
|||
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);
|
||||
defs.select("mask#water > rect").attr("width", maxWidth).attr("height", maxHeight);
|
||||
|
||||
fitScaleBar();
|
||||
if (window.fitLegendBox) fitLegendBox();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue