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

Add None option to Destinations layer picker #545

Merged
merged 1 commit into from
Aug 3, 2017

Conversation

CloudNiner
Copy link
Contributor

Overview

Add a "None" layer option to the Destinations layer group so that a user can toggle the display of destinations. This option is selected by default.

Demo

screen shot 2017-08-02 at 14 56 18

Notes

So that we do not mess up the order in which the layer groups draw in the picker, we have to ensure that we add the "None" layer immediately before the remaining destinations layers. The group layer control doesn't give us a way to specify a particular order.

Opened:
ismyrnow/leaflet-groupedlayercontrol#54

Testing Instructions

  • View a completed analysis job's detail page. Ensure you can select the "None" destination option and that it displays no results.

Closes #542

The fix for this is awkward. In order to not mess up the
order in which the layer groups draw in the picker, we
have to ensure that we add the "None" layer immediately
before the remaining destinations layers. The group layer
control doesn't give us a way to specify a particular order.

If we only add based on whether the ctl.destinationsNoneLayer
exists or not, we create it too early during the first scope
resolution, and the Destinations draw before the Overlays.

If we just create based on whether layers are present in the
$q.all callback, we may double create the none layer.

Opened:
ismyrnow/leaflet-groupedlayercontrol#54
Copy link
Contributor

@KlaasH KlaasH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CloudNiner CloudNiner merged commit 7830080 into develop Aug 3, 2017
@CloudNiner CloudNiner deleted the feature/awf/deselect-destination-type#542 branch August 3, 2017 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants