mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
This is not a clean backport due to the implementation diverging in 7.x/master vs 7.0/6.7. It requires adding a tooltip-listener to the border layer.
This commit is contained in:
parent
894167a256
commit
4d234f8d3f
1 changed files with 13 additions and 1 deletions
|
@ -475,6 +475,7 @@ export class VectorLayer extends AbstractLayer {
|
|||
mbMap.setLayoutProperty(lineLayerId, 'visibility', this.isVisible() ? 'visible' : 'none');
|
||||
mbMap.setLayerZoomRange(lineLayerId, this._descriptor.minZoom, this._descriptor.maxZoom);
|
||||
mbMap.setLayerZoomRange(fillLayerId, this._descriptor.minZoom, this._descriptor.maxZoom);
|
||||
this._addTooltipListeners(mbMap, lineLayerId);
|
||||
this._addTooltipListeners(mbMap, fillLayerId);
|
||||
}
|
||||
|
||||
|
@ -569,7 +570,18 @@ export class VectorLayer extends AbstractLayer {
|
|||
return;
|
||||
}
|
||||
|
||||
const features = mbMap.queryRenderedFeatures(e.point)
|
||||
const PADDING = 2;//in pixels
|
||||
const mbBbox = [
|
||||
{
|
||||
x: e.point.x - PADDING,
|
||||
y: e.point.y - PADDING
|
||||
},
|
||||
{
|
||||
x: e.point.x + PADDING,
|
||||
y: e.point.y + PADDING
|
||||
}
|
||||
];
|
||||
const features = mbMap.queryRenderedFeatures(mbBbox)
|
||||
.filter(feature => {
|
||||
return feature.layer.source === this.getId();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue