trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
214 stars 74 forks source link

Re-ordering icons on Draw Toolbar #85

Open andriesd opened 7 years ago

andriesd commented 7 years ago

This is a great library, thanks for all your work on this.

I was wondering if it would be possible to add an option to re-order the buttons on the tool bar (or maybe one exists and I just haven't been able to find it). Right now the default draw tool bar shows the polyline first, then polygon, then rectangle, then circle, then marker. I currently have set mine to show include the polygon and rectangle drawing options, but would like the rectangle drawing icon to appear on top of the polygon drawing icon.

Thanks for your help.

bhaskarvk commented 7 years ago

I don't think that is possible, but I will still investigate.

andriesd commented 7 years ago

Thanks, I appreciate that a lot. Found this other discussion (https://github.com/Leaflet/Leaflet.draw/issues/265) specifically about Leaflet Draw in JavaScript, but if there is a way to customize the toolbar with just leaflet.extras in Shiny that would be amazing

bhaskarvk commented 7 years ago

Wow that tread is so long and unfortunately no proper conclusion. The code to make it works is split into so many comments, it's virtually impossible for anyone but the author of make sense out of it. I've asked for a demo code and will be glad to incorporate if I get proper sample code.