-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build functionality into legends #32
Comments
Just to reiterate a requested feature: Allow legends to be "draggable" / "swappable" so that the legend order reflects the visible layers shown. |
It would be nice if the legends could also sort coastal habitat layers, this could be more tricky. Might be worth checking out this library: https://docs.dndkit.com/introduction/getting-started |
Using react-sortable-hoc and not doing any visual layer tricks yet.
Sorting is working with single layer services. It is not working yet with multi layer services such as coastal habitats or protected areas. Scrolling on drag is also not set up yet
Also do some CSS work to make sure that styling is as expected.
Rearraged coastal habitat layers in scaledefinitions so that they would layer in proper order with sorting via legends. Did not do this for protected areas becasue I don't think it matters
In #67 there was a bug introduced that now breaks the masking of national, admin, and hydro levels. I never thought to test this first. |
This bug was brought about after testing sorting but wasn't necessarily caused by sorting. Basically the bug was not being able to reliably redraw the z-index order when changing scale, changing basemaps, and changing visibility. This commit is a first pass at fixing that. It currently seems to function as expected.
Issue #98 is a duplicate of this issue. |
Add an "eye" icon to each legend entry that when clicked toggles the visibility of that layer on / off. The layer still remains "selected", only the visibility is effected.
Leaving opacity for future enhancements. |
When changing scales we're really changing the data in most cases as each aggegrated layer is it's own thing. Thus when using the eye icon to turn on/off visibility, it doesn't translate to the layers at different scales even though they might all be the same service. When changing scales, make sure to reset the eye icons to visible.
From Stacie:
T.E. : 1 - 3 days.
Original time estimate above has been busted. Sortable legends took a solid 2 full days. The other options should not take as long, but I'd guess another 2 days would be fair.
The text was updated successfully, but these errors were encountered: