Skip to content
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

Open
2 of 3 tasks
dcdenu4 opened this issue Jun 30, 2021 · 5 comments
Open
2 of 3 tasks

Build functionality into legends #32

dcdenu4 opened this issue Jun 30, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@dcdenu4
Copy link
Member

dcdenu4 commented Jun 30, 2021

From Stacie:

And I'm guessing that there will be icons for turning them on/off, re-ordering, opacity, or whatever functionality might make its way in there?

  • re-order layers based on sortable legends
  • add ability to toggle visibility through each legend
  • add opacity control to each legend

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.

@dcdenu4
Copy link
Member Author

dcdenu4 commented Jul 1, 2021

Just to reiterate a requested feature: Allow legends to be "draggable" / "swappable" so that the legend order reflects the visible layers shown.

@dcdenu4
Copy link
Member Author

dcdenu4 commented Sep 16, 2021

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

dcdenu4 added a commit that referenced this issue Sep 27, 2021
dcdenu4 added a commit that referenced this issue Sep 27, 2021
Using react-sortable-hoc and not doing any visual layer tricks yet.
dcdenu4 added a commit that referenced this issue Sep 27, 2021
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
dcdenu4 added a commit that referenced this issue Sep 27, 2021
Also do some CSS work to make sure that styling is as expected.
dcdenu4 added a commit that referenced this issue Sep 27, 2021
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
@dcdenu4 dcdenu4 self-assigned this Sep 27, 2021
@dcdenu4 dcdenu4 added this to the Final Prototype milestone Sep 27, 2021
@dcdenu4 dcdenu4 added the enhancement New feature or request label Sep 27, 2021
dcdenu4 added a commit that referenced this issue Sep 27, 2021
dcdenu4 added a commit that referenced this issue Sep 27, 2021
@dcdenu4 dcdenu4 added the bug Something isn't working label Sep 28, 2021
@dcdenu4
Copy link
Member Author

dcdenu4 commented Sep 28, 2021

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.

dcdenu4 added a commit that referenced this issue Oct 1, 2021
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.
dcdenu4 added a commit that referenced this issue Oct 4, 2021
@dcdenu4 dcdenu4 removed the bug Something isn't working label Oct 27, 2021
@dcdenu4
Copy link
Member Author

dcdenu4 commented Oct 27, 2021

Issue #98 is a duplicate of this issue.

dcdenu4 added a commit that referenced this issue Oct 27, 2021
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.
@dcdenu4
Copy link
Member Author

dcdenu4 commented Oct 27, 2021

Leaving opacity for future enhancements.

dcdenu4 added a commit that referenced this issue Oct 28, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant