diff options
-rw-r--r-- | main.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -171,9 +171,11 @@ map.getViewport().appendChild(container); /* scale line */ (function() { + const size = map.getSize(); const control = new ScaleLine({ units: 'metric', minWidth: 150, + maxWidth: size[1] < 350 ? size[1] - 50 : 350, target: container, }); control.element.classList.add('modal', 'modal-content'); |