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

Horizontal toolbars? #54

Open
sgofferj opened this issue Jun 24, 2019 · 5 comments
Open

Horizontal toolbars? #54

sgofferj opened this issue Jun 24, 2019 · 5 comments

Comments

@sgofferj
Copy link

Maybe I have missed something but is it possible to easily make horizontal toolbars with this plugin? If not yet, I would like to suggest it as a feature request.

@justinmanley
Copy link
Member

justinmanley commented Jun 25, 2019 via email

@sgofferj
Copy link
Author

The image doesn't show but basically, I want to create a toolbar for animation control and that is a bit awkward vertically. I'll try to make it work with your hints - thank you for those! - though I'm more or less a JS newbie. Modernizing my weather website saakeskus.fi is kinda also a huge JS learning project for me :D.

@justinmanley
Copy link
Member

sorry about that! Here's the picture I tried to send before:

Screen Shot 2019-06-24 at 6 46 10 PM

The approach I described above should allow you to create a horizontal toolbar by extending the Leaflet.toolbar library -- you shouldn't need to modify the library code at all. If you decide to submit a PR upstream (modifying the library to provide this new functionality), we would handle it a bit different -- probably creating an option on the Leaflet.Toolbar.Control class, rather than creating a new Leaflet.Toolbar.Control.Horizontal class.

@sgofferj
Copy link
Author

Jup, that's what I meant. Thank you!

@pispidikisj
Copy link

add the following css:

.leaflet-draw a {
float: left;
}

hToolbar

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

3 participants