diff --git a/Makefile b/Makefile index f90a969..8bccbe8 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ YUICOMPRESSOR_PATH=../yuicompressor-2.3.5.jar .PHONY: all -# we cheat and process all .js files instead of listing them +# we cheat and process all .js files instead of an exhaustive list all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js))) %.min.js: %.js diff --git a/NEWS.txt b/NEWS.txt index 53281c5..7bb3922 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,13 @@ +Flot x.x +-------- + + +Bug fixes: + +- Fixed problem with findNearbyItem and bars on top of each other + (reported by ragingchikn, issue 242). + + Flot 0.6 -------- diff --git a/jquery.flot.js b/jquery.flot.js index 6534a46..3a05ca9 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -1797,7 +1797,7 @@ smallestDistance = maxDistance * maxDistance + 1, item = null, foundPoint = false, i, j; - for (i = 0; i < series.length; ++i) { + for (i = series.length - 1; i >= 0; --i) { if (!seriesFilter(series[i])) continue; @@ -1831,7 +1831,7 @@ // use <= to ensure last point takes precedence // (last generally means on top of) - if (dist <= smallestDistance) { + if (dist < smallestDistance) { smallestDistance = dist; item = [i, j / ps]; }