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 6a3a554 commit 790bc3e
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 790bc3e

Please sign in to comment.