Skip to content

Commit

Permalink
add space before units in scale bar (mapbox#9276)
Browse files Browse the repository at this point in the history
  • Loading branch information
elygeo authored and mike-unearth committed Mar 18, 2020
1 parent b635b5d commit ff84e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/control/scale_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function setScale(container, maxWidth, maxDistance, unit) {
const distance = getRoundNum(maxDistance);
const ratio = distance / maxDistance;
container.style.width = `${maxWidth * ratio}px`;
container.innerHTML = distance + unit;
container.innerHTML = `${distance} ${unit}`;
}

function getDecimalRoundNum(d) {
Expand Down

0 comments on commit ff84e75

Please sign in to comment.