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 "Map#isMoving" method #2792 #3941

Merged
merged 3 commits into from
Jan 20, 2017
Merged

add "Map#isMoving" method #2792 #3941

merged 3 commits into from
Jan 20, 2017

Conversation

stepankuzmin
Copy link
Contributor

Add Map#isMoving method according to #2792

this.on('moveend', () => {
this.animationLoop.set(300); // text fading
this._rerender();
this._isMoving = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

There are already a few places we store this state in Camera. I'd prefer to avoid adding a new one, especially on Map. We are trying to move towards making Map more simple: #2741

  • Camera#_finishFn would be a drop-in replacement for Map#_isMoving
  • Camera#panning, Camera#pitching, and Camera#zooming are in the spirit of Map#_isMoving, should we add Camera#panning or Camera#moving?)

Copy link
Contributor Author

@stepankuzmin stepankuzmin Jan 19, 2017

Choose a reason for hiding this comment

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

So we should move Map#isMoving to Camera#isMoving? And add Camera#moving and Camera#panning similarly to Camera#rotating, Camera#pitching, and Camera#zooming?

Copy link
Contributor

@lucaswoj lucaswoj left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you!

@lucaswoj lucaswoj merged commit 34b2f34 into mapbox:master Jan 20, 2017
@stepankuzmin stepankuzmin deleted the 2792 branch October 2, 2017 16: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.

2 participants