Skip to content

Commit ff84e75

Browse files
elygeomike-unearth
authored andcommitted
add space before units in scale bar (mapbox#9276)
1 parent b635b5d commit ff84e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/control/scale_control.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function setScale(container, maxWidth, maxDistance, unit) {
120120
const distance = getRoundNum(maxDistance);
121121
const ratio = distance / maxDistance;
122122
container.style.width = `${maxWidth * ratio}px`;
123-
container.innerHTML = distance + unit;
123+
container.innerHTML = `${distance} ${unit}`;
124124
}
125125

126126
function getDecimalRoundNum(d) {

0 commit comments

Comments
 (0)