Skip to content

add map.getMaxBounds method - #4890

Merged
andrewharvey merged 2 commits into
masterfrom
getMaxBounds
Jun 27, 2017
Merged

andrewharvey merged 2 commits into
masterfrom
getMaxBounds

Conversation

@andrewharvey

@andrewharvey andrewharvey commented Jun 26, 2017 •

Copy link
Copy Markdown
Collaborator

Launch Checklist

part of #4029

Thanks to @lamuertepeluda for the inspiration in #4029 (comment)

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

Credit to @lamuertepeluda which provided some of the basis to this
commit at #4029 (comment)

@mollymerp mollymerp left a comment

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.

🙏 thanks @andrewharvey! just a small change but otherwise this looks good to me!

Comment thread src/ui/map.js
*
* @returns {LngLatBounds | null} The maximum bounds the map is constrained to, or `null` if none set.
*/
getMaxBounds () {

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.

I find this a little hard to read 😕 can we invert the check ( if (this.transform.latRange && this.transform.latRange.length == 2) && ... else { return null; } ) for clarity?

Comment thread src/ui/map.js
return this;

}

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.

accidental line? 🙃

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

everywhere else had a whitespace between methods, so I added one here to be consistent.

@andrewharvey

Copy link
Copy Markdown
Collaborator Author

should be good now

@mollymerp mollymerp left a comment

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.

👍

@andrewharvey
andrewharvey merged commit 3499f75 into master Jun 27, 2017
@andrewharvey
andrewharvey deleted the getMaxBounds branch June 27, 2017 00:46
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