mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-24 22:08:11 +08:00
[WIP] JS lint and dead code removal (#1053)
* lint and dead code removal * fix regressions
This commit is contained in:
@@ -3,6 +3,8 @@ import quantile from "./quantile";
|
||||
/*
|
||||
Centroid coordinate calculation
|
||||
*/
|
||||
|
||||
/* Unused - please cleanup
|
||||
const calcMeanCentroid = (world, annoName, annoValue, layoutDimNames) => {
|
||||
const centroid = { x: 0, y: 0, size: 0 };
|
||||
const annoArray = world.obsAnnotations.col(annoName).asArray();
|
||||
@@ -24,6 +26,7 @@ const calcMeanCentroid = (world, annoName, annoValue, layoutDimNames) => {
|
||||
|
||||
return [centroid.x, centroid.y];
|
||||
};
|
||||
*/
|
||||
|
||||
const calcMedianCentroid = (world, annoName, annoValue, layoutDimNames) => {
|
||||
const centroidX = [];
|
||||
|
||||
@@ -138,7 +138,7 @@ export function allHaveLabelByMask(df, colName, label, mask) {
|
||||
const col = df.col(colName);
|
||||
if (!col) return false;
|
||||
if (df.length !== mask.length)
|
||||
throw new InternalError("mismatch on mask length");
|
||||
throw new RangeError("mismatch on mask length");
|
||||
|
||||
for (let i = 0; i < df.length; i += 1) {
|
||||
if (mask[i]) {
|
||||
|
||||
@@ -108,7 +108,7 @@ export default class ImmutableTypedCrossfilter {
|
||||
};
|
||||
|
||||
return new ImmutableTypedCrossfilter(data, dimensions, {
|
||||
bitArray: bitArray
|
||||
bitArray
|
||||
});
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ export default class ImmutableTypedCrossfilter {
|
||||
}
|
||||
|
||||
return new ImmutableTypedCrossfilter(data, dimensions, {
|
||||
bitArray: bitArray
|
||||
bitArray
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user