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

More intuitive flyTo options #1858

Merged
merged 2 commits into from
Dec 22, 2015
Merged

More intuitive flyTo options #1858

merged 2 commits into from
Dec 22, 2015

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Dec 22, 2015

Added flyTo() options that are based on observable properties, so that suitable values can be chosen with less guessing and checking. The speed and curve options have unfortunate names and are difficult to explain, but I kept them for backwards compatibility. Also documented local variables in flyTo(), based on the paper that describes this algorithm, because the variable names are non-obvious.

Fixes #1854. This is a port of mapbox/mapbox-gl-native#3355.

/cc @lucaswoj @mourner

if (Math.abs(u1) < 0.000001) {
// Perform a more or less instantaneous transition if the path is
// too short.
Copy link
Member

Choose a reason for hiding this comment

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

Why use such a short wrap length for comments? Code lines are much longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about column 100? f6c0316

@mourner
Copy link
Member

mourner commented Dec 22, 2015

The API changes look good to me.

1ec5 added 2 commits December 22, 2015 11:00
Added flyTo() options that are based on observable properties, so that suitable values can be chosen without guessing and checking. Also documented local variables in flyTo(), based on the paper that describes this algorithm, because the names are non-obvious.

Fixes #1854.
@1ec5 1ec5 force-pushed the 1ec5-flight-options-1854 branch from f6c0316 to 1c33dc6 Compare December 22, 2015 19:01
@1ec5 1ec5 merged commit 1c33dc6 into master Dec 22, 2015
@1ec5 1ec5 removed the in progress label Dec 22, 2015
@1ec5 1ec5 deleted the 1ec5-flight-options-1854 branch December 22, 2015 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants