diff --git a/client/src/components/brushableHistogram/index.js b/client/src/components/brushableHistogram/index.js
index e7c6432c..a18608b2 100644
--- a/client/src/components/brushableHistogram/index.js
+++ b/client/src/components/brushableHistogram/index.js
@@ -450,7 +450,6 @@ const Histogram = ({
isScatterplotYYaccessor: state.controls.scatterplotYYaccessor === field,
continuousSelectionRange: state.continuousSelection[myName],
isColorAccessor: state.colors.colorAccessor === field,
- singleContinuousValues: state.singleContinuousValue.singleContinuousValues,
};
})
class HistogramBrush extends React.PureComponent {
@@ -609,44 +608,18 @@ class HistogramBrush extends React.PureComponent {
};
fetchAsyncProps = async () => {
- const { annoMatrix, field, dispatch, singleContinuousValues } = this.props;
+ const { annoMatrix } = this.props;
const { isClipped } = annoMatrix;
- if (singleContinuousValues.has(field)) {
- return {
- histogram: undefined,
- range: undefined,
- unclippedRange: undefined,
- unclippedRangeColor: globals.blue,
- isSingleValue: true,
- OK2Render: false,
- };
- }
+
const query = this.createQuery();
const df = await annoMatrix.fetch(...query);
const column = df.icol(0);
+ // if we are clipped, fetch both our value and our unclipped value,
+ // as we need the absolute min/max range, not just the clipped min/max.
const summary = column.summarize();
const range = [summary.min, summary.max];
- if (summary.min === summary.max && !isClipped) {
- dispatch({
- type: "add single continuous value",
- field,
- value: summary.min,
- });
- return {
- histogram: undefined,
- range,
- unclippedRange: range,
- unclippedRangeColor: globals.blue,
- isSingleValue: true,
- OK2Render: false,
- };
- }
-
- const isSingleValue = summary.min === summary.max;
- // if we are clipped, fetch both our value and our unclipped value,
- // as we need the absolute min/max range, not just the clipped min/max.
let unclippedRange = [...range];
if (isClipped) {
const parent = await annoMatrix.viewOf.fetch(...query);
@@ -670,6 +643,7 @@ class HistogramBrush extends React.PureComponent {
this.height
);
+ const isSingleValue = summary.min === summary.max;
const nonFiniteExtent =
summary.min === undefined ||
summary.max === undefined ||
diff --git a/client/src/components/infoDrawer/infoDrawer.js b/client/src/components/infoDrawer/infoDrawer.js
index aad395bc..9f41ef14 100644
--- a/client/src/components/infoDrawer/infoDrawer.js
+++ b/client/src/components/infoDrawer/infoDrawer.js
@@ -1,6 +1,7 @@
import React, { PureComponent } from "react";
-import { connect, shallowEqual } from "react-redux";
+import { connect } from "react-redux";
import { Drawer } from "@blueprintjs/core";
+
import InfoFormat from "./infoFormat";
import { selectableCategoryNames } from "../../util/stateManager/controlsHelpers";
@@ -12,14 +13,9 @@ import { selectableCategoryNames } from "../../util/stateManager/controlsHelpers
aboutURL: state.config?.links?.["about-dataset"],
isOpen: state.controls.datasetDrawer,
dataPortalProps: state.config?.["corpora_props"] ?? {},
- singleContinuousValues: state.singleContinuousValue.singleContinuousValues,
};
})
class InfoDrawer extends PureComponent {
- static watchAsync(props, prevProps) {
- return !shallowEqual(props.watchProps, prevProps.watchProps);
- }
-
handleClose = () => {
const { dispatch } = this.props;
@@ -34,22 +30,18 @@ class InfoDrawer extends PureComponent {
schema,
isOpen,
dataPortalProps,
- singleContinuousValues,
} = this.props;
const allCategoryNames = selectableCategoryNames(schema).sort();
- const allSingleValues = new Map();
+ const singleValueCategories = new Map();
allCategoryNames.forEach((catName) => {
const isUserAnno = schema?.annotations?.obsByName[catName]?.writable;
const colSchema = schema.annotations.obsByName[catName];
if (!isUserAnno && colSchema.categories?.length === 1) {
- allSingleValues.set(catName, colSchema.categories[0]);
+ singleValueCategories.set(catName, colSchema.categories[0]);
}
});
- singleContinuousValues.forEach((value, catName) => {
- allSingleValues.set(catName, value);
- });
return (