Merge pull request #3980 from panda01/fix/3930/endzoneTooltipFixForFF

Endzone Tooltips fix for FF.
This commit is contained in:
Spencer 2015-05-27 12:45:07 -07:00
commit 03bd004a1a

View file

@ -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;
};
});
});