-
-
Notifications
You must be signed in to change notification settings - Fork 6k
IsValid for Bounds and LatLngBounds #972
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
Conversation
|
Can you please revert/remove your rebuilt leaflet from the pull, it ruins trying to merging multiple pulls. Could isValid just be |
|
Of course it can simply be |
|
Any comments? |
|
Yep looks great to me! |
|
|
||
| isValid: function () { | ||
| return this.min && typeof this.max; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to remove typeof. Also, to cast everything to boolean, you can just do !!(this.min && this.max)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid me.
Leaflet#966. Added specification.
|
Looks good to me! |
IsValid for Bounds and LatLngBounds
Added documentation for isValid from #972.
Implemented isValid() function for Bounds and LatLngBounds. Fixes issue #966. Added specification as well.
Example usage: