Skip to content

Fixes #552 Handle properly the new props#563

Merged
mbarto merged 1 commit intogeosolutions-it:masterfrom
nmco:issue-552-double-zoom-to-extent-bug
May 13, 2016
Merged

Fixes #552 Handle properly the new props#563
mbarto merged 1 commit intogeosolutions-it:masterfrom
nmco:issue-552-double-zoom-to-extent-bug

Conversation

@nmco
Copy link
Copy Markdown

@nmco nmco commented May 12, 2016

We were testing new props against the map values instead of the current props. I update the way we test the new props by checking against the current props and the map values. This pull request also ads a proper test for this.

isNearlyEqual(newCenter.y, currentCenter.y);
// if props are the same nothing to do, otherwise
// we need to check if the new center is equal to map center
const centerIsUpdate = propsCentersEqual ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

constant/variable names are important: this should be called centerIsNotUpdated

@nmco nmco force-pushed the issue-552-double-zoom-to-extent-bug branch from 665096a to c9cd539 Compare May 13, 2016 08:04
@nmco
Copy link
Copy Markdown
Author

nmco commented May 13, 2016

Updated. Thanks for the review.

@mbarto mbarto merged commit dbc24b3 into geosolutions-it:master May 13, 2016
offtherailz pushed a commit to offtherailz/MapStore2 that referenced this pull request May 18, 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