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

Added optional custom zoomToFeature action #1234

Merged
merged 2 commits into from
Nov 2, 2016

Conversation

kappu72
Copy link
Contributor

@kappu72 kappu72 commented Nov 2, 2016

No description provided.

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 unit tests?

@@ -245,7 +246,11 @@ const FeatureGrid = React.createClass({
zoomToFeature(params) {
let geometry = params.data.geometry;
if (geometry.coordinates) {
this.changeMapView([geometry], this.props.zoom);
if (this.props.zoomToFeatureAction) {
this.props.zoomToFeatureAction(params.data, params.data.geometry);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you pass params.data, you don't need the 2nd argument

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 79.756% when pulling 92b2984 on kappu72:customZoomToFeatureAction into 2ab0ab2 on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.005%) to 79.765% when pulling 5400e8a on kappu72:customZoomToFeatureAction into 2ab0ab2 on geosolutions-it:master.

@mbarto mbarto merged commit 47ed231 into geosolutions-it:master Nov 2, 2016
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