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 removeLayer action #1157

Merged
merged 2 commits into from
Oct 18, 2016
Merged

Conversation

manisandro
Copy link
Contributor

@manisandro manisandro commented Oct 17, 2016

Adds an easy to use removeLayer action complementary to addLayer.

@simboss simboss added the ready label Oct 17, 2016
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 80.452% when pulling fda2d61 on sourcepole:remove_layer into ffbaac9 on geosolutions-it:master.

Copy link
Contributor

@mbarto mbarto left a comment

Choose a reason for hiding this comment

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

Can you add test cases?

@@ -264,6 +264,23 @@ function layers(state = [], action) {
groups: newGroups
};
}
case REMOVE_LAYER: {
let layer = (state.flat || []).find(obj => obj.id === action.layerId);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think find is supported by all browsers. You can use filter and lodash head function to get the same result

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 80.605% when pulling 36c4e35 on sourcepole:remove_layer into 1ffcfb3 on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 80.622% when pulling 2f201fc on sourcepole:remove_layer into 1ffcfb3 on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 80.622% when pulling 28a3182 on sourcepole:remove_layer into 1ffcfb3 on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 80.622% when pulling 28a3182 on sourcepole:remove_layer into 1ffcfb3 on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 80.52% when pulling e42dcc7 on sourcepole:remove_layer into 1ffcfb3 on geosolutions-it:master.

@mbarto mbarto merged commit 9d3ce06 into geosolutions-it:master Oct 18, 2016
@manisandro manisandro deleted the remove_layer branch October 18, 2016 13:14
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.

4 participants