-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Hit detection respects min and maxResolution #2109
Conversation
* @param {ol.layer.LayerState} layerState Layer state. | ||
* @param {number} resolution Resolution. | ||
* @return {boolean} Visible at resolution? | ||
* @public |
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.
This would be the first @public
annotation in the library. Any reason for it?
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.
No I'll remove it.
A couple of doc comments, but otherwise this looks good to me. |
Thanks for the review. I'll make changes and merge. |
* the layer's minResolution and maxResolution. | ||
* @param {ol.layer.LayerState} layerState Layer state. | ||
* @param {number} resolution Resolution. | ||
* @return {boolean} Visible at resolution? |
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.
Also minor, but if you're making doc changes, I'd like to see us start getting consistent about documenting boolean returns. I think they should all be documented as positive assertions. E.g. "The layer is visible at the given resolution." If true
, the assertion holds. If false
, it doesn't.
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.
Good call.
Hit detection respects min and maxResolution
This fixes the bug reported in #2106, where the hit detection code detects features that are not actually rendered because the current resolution is outside the resolution range defined on the vector layer.
Please review.
closes #2106.