Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrent scale box width #2

Open
alexhuynh7 opened this issue Apr 3, 2024 · 0 comments
Open

Incorrent scale box width #2

alexhuynh7 opened this issue Apr 3, 2024 · 0 comments

Comments

@alexhuynh7
Copy link

I use this nautical scale with a Leaflet map.
image

50km = 26.9978 nautical miles
In the image, the width of the scale box of 50km is wider than the width of the scale box of 30nm.
In the source code, I see this line:
scale.style.width = Math.round(this.options.maxWidth * (nauticalMiles / maxNauticalMiles)) - 10 + 'px';
Not sure why the author minuses 10.
Any idea to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant