From eaa4e6c7a4e86b486322ba2a94ff249a2f20802e Mon Sep 17 00:00:00 2001 From: bkmartinjr Date: Tue, 29 May 2018 20:34:59 -0700 Subject: [PATCH] fix bug in selectOne and deselectOne --- src/util/typedCrossfilter/bitArray.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/typedCrossfilter/bitArray.js b/src/util/typedCrossfilter/bitArray.js index cff83569..dd7c1eb3 100644 --- a/src/util/typedCrossfilter/bitArray.js +++ b/src/util/typedCrossfilter/bitArray.js @@ -140,7 +140,7 @@ class BitArray { const col = dim >>> 5; const before = this.bitarray[col * this.length + index]; const after = before | (1 << (dim % 32)); - this.bitarray[col] = after; + this.bitarray[col * this.length + index] = after; } // deselect index on dimension @@ -149,7 +149,7 @@ class BitArray { const col = dim >>> 5; const before = this.bitarray[col * this.length + index]; const after = before & ~(1 << (dim % 32)); - this.bitarray[col] = after; + this.bitarray[col * this.length + index] = after; } // select all indices on dimension.