Commit 1e050212 authored by olau@iola.dk's avatar olau@iola.dk

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)


git-svn-id: https://flot.googlecode.com/svn/trunk@307 1e0a6537-2640-0410-bfb7-f154510ff394
parent ddcfbb14
...@@ -140,6 +140,9 @@ Bug fixes: ...@@ -140,6 +140,9 @@ Bug fixes:
correctly (fix by Mike, issue 263). correctly (fix by Mike, issue 263).
- Fix bug in restoring cursor in navigate plugin (reported by Matteo - Fix bug in restoring cursor in navigate plugin (reported by Matteo
Gattanini, issue 395). 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 Flot 0.6
......
...@@ -2217,6 +2217,13 @@ ...@@ -2217,6 +2217,13 @@
maxx = maxDistance / axisx.scale, maxx = maxDistance / axisx.scale,
maxy = maxDistance / axisy.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) { if (s.lines.show || s.points.show) {
for (j = 0; j < points.length; j += ps) { for (j = 0; j < points.length; j += ps) {
var x = points[j], y = points[j + 1]; var x = points[j], y = points[j + 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment