stefanocudini / leaflet-panel-layers

Leaflet Control Layers extended with support groups and icons
https://opengeo.tech/maps/leaflet-panel-layers/
MIT License
286 stars 92 forks source link

Clicking on labels to collapse/expand groups #51

Closed Istador closed 4 years ago

Istador commented 5 years ago

Currently, a user needs to click on the small + or - buttons to collapse or expand a group.

The user experience should be the same as with the base and overlay layers, where the user can click anywhere he wants to select/deselect a layer (icon, text or <input>)

It'd be more convenient, if the click handler would be on the <label>, the icon would be inside of the label, and the label would fill the whole width.

takvol commented 5 years ago

That's a reasonable idea. I use a similar approach myself.