Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endzone Tooltips fix for FF. #3980

Merged
merged 1 commit into from
May 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to get rid of the xScale() stuff here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did. It doesn't seem to do anything. especially considering the xLeft and such seems to just be used to determine the position of the mouse.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code is what's responsible for showing the warning anytime you hover on a bucket that goes out of bounds.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk man it does that now. It seemed to me this is what the function was
really trying to accomplish
On May 26, 2015 4:43 PM, "Spencer" notifications@github.com wrote:

In src/kibana/components/vislib/visualizations/_point_series_chart.js
#3980 (comment):

     var min = leftEndzone.w;
     var max = rightEndzone.x;

     // bounds of the cursor to consider
  •    var xLeft = event.offsetX;
    
  •    var xRight = event.offsetX;
    
  •    if (wholeBucket) {
    
  •      xLeft = xScale(boundData.x);
    

That code is what's responsible for showing the warning anytime you hover
on a bucket that goes out of bounds.


Reply to this email directly or view it on GitHub
https://github.com/elastic/kibana/pull/3980/files#r31077611.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I'm talking about:
2015-05-26 14_00_03

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and on master:

2015-05-26 14_01_54

var xRight = mouseChartXCoord;
if (wholeBucket) {
xLeft = xScale(boundData.x);
xRight = xScale(xAxis.addInterval(boundData.x));
}


return {
wholeBucket: wholeBucket,
touchdown: min > xLeft || max < xRight
Expand All @@ -133,4 +137,4 @@ define(function (require) {

return PointSeriesChart;
};
});
});