Skip to content

Commit

Permalink
Fix #129: updating groups after filterFunction.
Browse files Browse the repository at this point in the history
A serious bug was introduced in version 1.3.8, causing groups on the
first dimension to be incorrectly calculated after a filterFunction was
called on another dimension.
  • Loading branch information
jasondavies committed Oct 3, 2014
1 parent 6e864fc commit c8766a2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "crossfilter",
"repo": "square/crossfilter",
"description": "Fast n-dimensional filtering and grouping of records.",
"version": "1.3.10",
"version": "1.3.11",
"keywords": [],
"main": "crossfilter.js",
"scripts": [
Expand Down
4 changes: 2 additions & 2 deletions crossfilter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(exports){
crossfilter.version = "1.3.10";
crossfilter.version = "1.3.11";
function crossfilter_identity(d) {
return d;
}
Expand Down Expand Up @@ -825,7 +825,7 @@ function crossfilter() {
removed = [];

for (i = 0; i < n; ++i) {
if (filters[k = index[i]] & one ^ !(x = f(values[i], i))) {
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.10",
"version": "1.3.11",
"description": "Fast multidimensional filtering for coordinated views.",
"keywords": [
"square",
Expand Down
Loading

0 comments on commit c8766a2

Please sign in to comment.