diff --git a/client/src/components/brushableHistogram/index.js b/client/src/components/brushableHistogram/index.js index 9f501ce9..72642b54 100644 --- a/client/src/components/brushableHistogram/index.js +++ b/client/src/components/brushableHistogram/index.js @@ -184,8 +184,21 @@ class HistogramBrush extends React.Component { } } + removeHistogram() { + const { dispatch, field, colorAccessor } = this.props; + dispatch({ + type: "clear user defined gene", + data: field + }); + if (field === colorAccessor) { + dispatch({ + type: "reset colorscale" + }); + } + } + render() { - const { field, ranges, colorAccessor } = this.props; + const { field, ranges, colorAccessor, isUserDefined } = this.props; return (
-

{field}

+
+ {field} + {isUserDefined ? ( + + remove + + ) : null} +
{ + return d.type === "int32" || d.type === "float32"; + }); + this.continuousChecked = true; /* only do this once */ + } return (
+ {this.hasContinuous ?

Continuous metadata

: null} {_.map(ranges, (value, key) => { const isColorField = key.includes("color") || key.includes("Color"); if (value.range && key !== "name" && !isColorField) { diff --git a/client/src/components/expression/cellSetButtons.js b/client/src/components/expression/cellSetButtons.js index 8ccd1ea4..ac4364ea 100644 --- a/client/src/components/expression/cellSetButtons.js +++ b/client/src/components/expression/cellSetButtons.js @@ -9,17 +9,23 @@ import actions from "../../actions"; @connect() class CellSetButton extends React.Component { set() { + const { differential } = this.props; + const set = _.map(this.props.crossfilter.allFiltered(), "name"); - this.props.dispatch({ - type: - "store current cell selection as differential set " + - this.props.eitherCellSetOneOrTwo, - data: set - }); + if (!differential.diffExp) { + /* diffexp needs to be cleared before we store a new set */ + this.props.dispatch({ + type: + "store current cell selection as differential set " + + this.props.eitherCellSetOneOrTwo, + data: set + }); + } } render() { + const { differential } = this.props; return (