question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to collapse groups

See original GitHub issue

Dear 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+"'>&nbsp-</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() == "&nbsp;+")
    {
        $("#leaflet-control-"+myid).children().show()
        $("#"+myid).html("&nbsp;-")
    }
    else
    {
        $("#leaflet-control-"+myid).children().hide()
        $("#"+myid).html("&nbsp;+")
    }
})

Best regards,

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tsrmancommented, Nov 28, 2016

Im litte bit busy for this time, i try create pull request on next week.

0reactions
hjrobinsoncommented, May 27, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found