mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Tooltip] Changed the way the tooltip functions to make up for the fact firefox doesn't have certain properties on the event and event target
This commit is contained in:
parent
d6a90b2806
commit
0bd6a5994b
1 changed files with 7 additions and 3 deletions
|
@ -48,6 +48,7 @@ define(function (require) {
|
|||
* @returns {D3.Selection}
|
||||
*/
|
||||
PointSeriesChart.prototype.createEndZones = function (svg) {
|
||||
var self = this;
|
||||
var xAxis = this.handler.xAxis;
|
||||
var xScale = xAxis.xScale;
|
||||
var yScale = xAxis.yScale;
|
||||
|
@ -100,19 +101,22 @@ define(function (require) {
|
|||
|
||||
function callPlay(event) {
|
||||
var boundData = event.target.__data__;
|
||||
var mouseChartXCoord = event.clientX - self.chartEl.getBoundingClientRect().left;
|
||||
var wholeBucket = boundData && boundData.x != null;
|
||||
|
||||
// the min and max that the endzones start in
|
||||
var min = leftEndzone.w;
|
||||
var max = rightEndzone.x;
|
||||
|
||||
// bounds of the cursor to consider
|
||||
var xLeft = event.offsetX;
|
||||
var xRight = event.offsetX;
|
||||
var xLeft = mouseChartXCoord;
|
||||
var xRight = mouseChartXCoord;
|
||||
if (wholeBucket) {
|
||||
xLeft = xScale(boundData.x);
|
||||
xRight = xScale(xAxis.addInterval(boundData.x));
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
wholeBucket: wholeBucket,
|
||||
touchdown: min > xLeft || max < xRight
|
||||
|
@ -133,4 +137,4 @@ define(function (require) {
|
|||
|
||||
return PointSeriesChart;
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue