[WIP] JS lint and dead code removal (#1053)

* lint and dead code removal

* fix regressions
This commit is contained in:
Bruce Martin
2019-11-21 14:10:02 -08:00
committed by GitHub
parent 9a540a4f0a
commit ee62dd355f
16 changed files with 118 additions and 155 deletions
+3
View File
@@ -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
});
}