diff --git a/NEWS.txt b/NEWS.txt index 6b2e57b..a753419 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -140,6 +140,9 @@ Bug fixes: correctly (fix by Mike, issue 263). - Fix bug in restoring cursor in navigate plugin (reported by Matteo Gattanini, issue 395). +- Fix bug in picking items when transform/inverseTransform is in use + (reported by Ofri Raviv, and patches and analysis by Jan and Tom + Paton, issue 334 and 467). Flot 0.6 diff --git a/jquery.flot.js b/jquery.flot.js index 7f44d26..3a92dab 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -2217,6 +2217,13 @@ maxx = maxDistance / axisx.scale, maxy = maxDistance / axisy.scale; + // with inverse transforms, we can't use the maxx/maxy + // optimization, sadly + if (axisx.options.inverseTransform) + maxx = Number.MAX_VALUE; + if (axisy.options.inverseTransform) + maxy = Number.MAX_VALUE; + if (s.lines.show || s.points.show) { for (j = 0; j < points.length; j += ps) { var x = points[j], y = points[j + 1];