Add option to collapse groups
See original GitHub issueDear contributors,
I would find nice to implement some sort of collapsing of the groups. Here is how I did it quick and dirty with jqm :
if (!groupContainer) {
[...]
groupLabel.innerHTML = obj.group.name + "<span class='group-button' id='layers-group-"+obj.group.id+"'> -</span>";
container.appendChild(groupLabel);
container.appendChild(groupContainer);
[...]
}
At the end, added :
$('body').delegate('.group-button', 'click', function()
{
var myid = $(this)[0].id
console.log(myid)
if ($("#"+myid).html() == " +")
{
$("#leaflet-control-"+myid).children().show()
$("#"+myid).html(" -")
}
else
{
$("#leaflet-control-"+myid).children().hide()
$("#"+myid).html(" +")
}
})
Best regards,
Issue Analytics
- State:
- Created 9 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How To Collapse Or Expand All Groups In Outlook
For expanding all groups, hold on the Ctrl key and then press + sign on the number keyboard. For collapsing all groups, you...
Read more >How to collapse or expand all groups in Outlook? - ExtendOffice
In Outlook 2007, please click View > Expand/Collapse Groups, and then choose the options that you want to do from the expanded list....
Read more >Collapse and expand groups in Motion - Apple Support
In Motion, collapsed groups appear as a single row. ... then press Option-Right Arrow to open a group or Option-Left Arrow to collapse...
Read more >How to group rows in Excel to collapse and expand them
1. Create outer groups (level 1) ... Select one of the larger subsets of data, including all of the intermediate summary rows and...
Read more >Collapse or expand parts of a document - Microsoft Support
Place your cursor in the heading. · On the Home tab, click the arrow in the Paragraph group. The arrow to open the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Im litte bit busy for this time, i try create pull request on next week.
Okay, so I used the fork, but the only way I can add polygons to the layer control (and avoiding a failed page load) is by extracting coordinates from a geoJSON file and adding them to into a polygon. I guess I could try to write a loop to convert the text, but is there a way to get L.geoJSON directly into the layer instead of using L.polygon?