Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[node] Revert semantics of Map#render - #7098

Merged
jfirebaugh merged 3 commits into
masterfrom
revert-node-api
Nov 17, 2016
Merged

jfirebaugh merged 3 commits into
masterfrom
revert-node-api

Conversation

@jfirebaugh

Copy link
Copy Markdown
Contributor

Revert node Map#render API to "stateless" camera semantics: the center, zoom, bearing, and pitch passed are what is used to render, with defaults for unspecified values.

For the test-suite implementation, which wants stateful semantics, track the camera options manually. Also, change the implementation of Map#render so that it avoids calling setCenter, etc. when the value is not changing. (Internally, setCenter does not short-circuit, so it could cause undesired updates.)

cc @mikemorris

@mention-bot

Copy link
Copy Markdown

@jfirebaugh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kkaefer, @mikemorris and @ansis to be potential reviewers.

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.

Would a check for setPitch be necessary here too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not required by test-suite yet, but might as well. ✅

@jfirebaugh
jfirebaugh merged commit 5c7aeec into master Nov 17, 2016
@jfirebaugh
jfirebaugh deleted the revert-node-api branch November 17, 2016 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants