Fixed problem with findNearbyItem and bars on top of each other (reported by ragingchikn, issue 242)

git-svn-id: https://flot.googlecode.com/svn/trunk@226 1e0a6537-2640-0410-bfb7-f154510ff394
pull/1/head
olau@iola.dk 17 years ago
parent 8a2e8c62c6
commit 356a27b660

@ -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

@ -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
--------

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

Loading…
Cancel
Save