Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature: Allow some way to sort the Legend, or keep it sorted when adding/removing items. #1147

@laundmo

Description

@laundmo

In my use-case, I switch between separate modes of the map, upon which I change some of the Legend items. The issue is, when removing and re-adding them, they get added at the bottom. This requires keeping a sorted list of all legend items externally, and re-adding them all.

I would love some feature which allows keeping them sorted. Ideally, i'd imagine some kind of sort index as part of LegendItemOptions, by which they're sorted when rendering. Another option would be to allow disabling Items, which means they can keep their original position and just be disabled, instead of removing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions