From 09ee0c0769e4b5856f19df4ea56d61d2fe22843c Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 19 Nov 2023 14:43:30 +0400 Subject: [PATCH] fix: rescale water mask on screen size change --- modules/ui/options.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/options.js b/modules/ui/options.js index b7d7bcdf..5ae560e6 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -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();