mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Merge pull request #3856 from panda01/fix/3855/showPartiallyVisibleBuckets
Show partially visible buckets
This commit is contained in:
commit
f0414d5549
1 changed files with 4 additions and 4 deletions
|
@ -199,12 +199,12 @@ define(function (require) {
|
|||
* Return features within the map bounds
|
||||
*/
|
||||
TileMap.prototype._filterToMapBounds = function (map) {
|
||||
function cloneAndReverse(arr) { return _(_.clone(arr)).reverse().value(); }
|
||||
return function (feature) {
|
||||
var coordinates = feature.geometry.coordinates;
|
||||
var p0 = coordinates[0];
|
||||
var p1 = coordinates[1];
|
||||
var mapBounds = map.getBounds();
|
||||
var bucketRectBounds = feature.properties.rectangle.map(cloneAndReverse);
|
||||
|
||||
return map.getBounds().contains([p1, p0]);
|
||||
return mapBounds.intersects(bucketRectBounds);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue