mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
fix: don't redraw removed scaleBar
This commit is contained in:
parent
433152db06
commit
5ec59da7b7
6 changed files with 37 additions and 18 deletions
|
|
@ -535,7 +535,7 @@ class Planimeter extends Measurer {
|
|||
|
||||
// Scale bar
|
||||
function drawScaleBar(scaleBar, scaleLevel) {
|
||||
if (scaleBar.style("display") === "none") return; // no need to re-draw hidden element
|
||||
if (!scaleBar.size() || scaleBar.style("display") === "none") return;
|
||||
scaleBar.selectAll("*").remove(); // fully redraw every time
|
||||
|
||||
const distanceScale = +distanceScaleInput.value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue