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

Fix easeTo pan, zoom, and rotate when initial rotation != 0 #1950

Merged
merged 1 commit into from
Jan 20, 2016

Conversation

lucaswoj
Copy link
Contributor

fixes #1944

This fixes the bug but might not be the most elegant solution.

👀 💭 @mourner @ansis @1ec5

@@ -475,10 +475,6 @@ util.extend(Camera.prototype, /** @lends Map.prototype */{
this.pitching = true;
}

if (this.zooming && !around) {
around = tr.pointLocation(tr.centerPoint.add(to.sub(from).div(1 - 1 / scale)));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I can tell, this code is not needed. There may also be a solution that involves incorporating bearing into the above calculation.

@mourner
Copy link
Member

mourner commented Jan 20, 2016

👍 the removed code was apparently needed earlier but is not needed after some more recent changes, might be worth looking in git blame.

@lucaswoj
Copy link
Contributor Author

I'm 90% sure that the "more recent changes" were done by me but I can't find the commit off hand.

@lucaswoj lucaswoj merged commit 392a8c7 into master Jan 20, 2016
@lucaswoj lucaswoj deleted the easeto-1944 branch January 20, 2016 17:52
@lucaswoj lucaswoj restored the easeto-1944 branch January 20, 2016 17:53
@lucaswoj lucaswoj deleted the easeto-1944 branch January 20, 2016 18:20
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.

easeTo does not work properly if multiple values are changed
3 participants