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

Zooming in/out the map updates zoom value. Fixes #59. #60

Merged
merged 2 commits into from Oct 7, 2014

Conversation

mbykovskyy
Copy link
Contributor

Listen for zoom_changed events and update the map zoom level if new value is not equal to the old value.

@@ -546,7 +546,7 @@
},

zoomChanged: function() {
if (this.map) {
if (this.map && this.map.getZoom() !== this.zoom) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to do this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really. Google Maps ignores the request if the new value is the same as the current value. I just have a habit of checking the new != old before setting values, incase implementation doesn't handle it or changes.

I can remove the check if you feel it's unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove an save the function call.

ebidel added a commit that referenced this pull request Oct 7, 2014
Zooming in/out the map updates zoom value. Fixes #59.
@ebidel ebidel merged commit 9e1b285 into GoogleWebComponents:master Oct 7, 2014
@mbykovskyy mbykovskyy deleted the zoom_update branch December 5, 2014 05:59
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.

None yet

2 participants