mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 09:18:12 +08:00
fix bug in selectOne and deselectOne
This commit is contained in:
@@ -140,7 +140,7 @@ class BitArray {
|
|||||||
const col = dim >>> 5;
|
const col = dim >>> 5;
|
||||||
const before = this.bitarray[col * this.length + index];
|
const before = this.bitarray[col * this.length + index];
|
||||||
const after = before | (1 << (dim % 32));
|
const after = before | (1 << (dim % 32));
|
||||||
this.bitarray[col] = after;
|
this.bitarray[col * this.length + index] = after;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deselect index on dimension
|
// deselect index on dimension
|
||||||
@@ -149,7 +149,7 @@ class BitArray {
|
|||||||
const col = dim >>> 5;
|
const col = dim >>> 5;
|
||||||
const before = this.bitarray[col * this.length + index];
|
const before = this.bitarray[col * this.length + index];
|
||||||
const after = before & ~(1 << (dim % 32));
|
const after = before & ~(1 << (dim % 32));
|
||||||
this.bitarray[col] = after;
|
this.bitarray[col * this.length + index] = after;
|
||||||
}
|
}
|
||||||
|
|
||||||
// select all indices on dimension.
|
// select all indices on dimension.
|
||||||
|
|||||||
Reference in New Issue
Block a user