Skip to content

Commit

Permalink
Fix filterFunction followed by filterRange.
Browse files Browse the repository at this point in the history
Fixes #93, #94.
  • Loading branch information
jasondavies committed Sep 12, 2013
1 parent d3b8bb6 commit 86b1660
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
8 changes: 4 additions & 4 deletions crossfilter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(exports){
crossfilter.version = "1.3.2";
crossfilter.version = "1.3.3";
function crossfilter_identity(d) {
return d;
}
Expand Down Expand Up @@ -634,10 +634,10 @@ function crossfilter() {
newValues = permute(newValues, newIndex);

// Bisect newValues to determine which new records are selected.
var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i, k;
var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
if (refilterFunction) {
for (i = 0; i < n1; ++i) {
if (!refilterFunction(newValues[i], k = newIndex[i] + n0)) filters[k] |= one;
if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one;
}
} else {
for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
Expand Down Expand Up @@ -811,7 +811,7 @@ function crossfilter() {
removed = [];

for (i = 0; i < n; ++i) {
if (!(filters[k = index[i]] & one) ^ (x = f(values[i], k))) {
if (!(filters[k = index[i]] & one) ^ (x = f(values[i], i))) {
if (x) filters[k] &= zero, added.push(k);
else filters[k] |= one, removed.push(k);
}
Expand Down
2 changes: 1 addition & 1 deletion crossfilter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossfilter",
"version": "1.3.2",
"version": "1.3.3",
"description": "Fast multidimensional filtering for coordinated views.",
"keywords": [
"square",
Expand Down
Loading

0 comments on commit 86b1660

Please sign in to comment.