Don't check hover if hovering features are empty#179
Conversation
Otherwise, an error may occur in the inBounds() function when it checks if some point is within the bounds but the bounds are empty.
+ performance optimization for tryHover method
|
New patch contains a fix for issue #182. So hover handlers now correctly implemented for glify.lines(). Plus added some performance optimizations, like cached bounding rectangle with all features, etc. |
|
Actually that check, In my particular implementation users working only on the part of map filled with features, so we don't need to check whether mouse hovers the rectangle with features. The features are certainly always in view in my case. So maybe it worth to add another additional option, something like "checkHoverBounds" and do that So for my particular implementation this |
Otherwise, an error may occur in the inBounds() function when it checks if some point is within the bounds but the bounds are empty.
This fixes possible issue with glify.lines() layers.