mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 16:28:12 +08:00
do not reset color-by when subsetting world (#636)
* do not reset colors when subsetting to world * revert diffexp state change
This commit is contained in:
@@ -21,7 +21,6 @@ import finiteExtent from "../../util/finiteExtent";
|
||||
crossfilter: state.controls.crossfilter,
|
||||
differential: state.differential,
|
||||
colorAccessor: state.controls.colorAccessor,
|
||||
colorScale: state.controls.colorScale,
|
||||
obsAnnotations: _.get(state.controls.world, "obsAnnotations", null)
|
||||
}))
|
||||
class HistogramBrush extends React.Component {
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as globals from "../../globals";
|
||||
|
||||
@connect(state => ({
|
||||
categoricalSelectionState: state.controls.categoricalSelectionState,
|
||||
colorScale: state.controls.colorScale,
|
||||
colorScale: state.controls.colors.scale,
|
||||
colorAccessor: state.controls.colorAccessor,
|
||||
schema: _.get(state.controls.world, "schema", null),
|
||||
world: state.controls.world
|
||||
|
||||
@@ -11,7 +11,7 @@ import HistogramBrush from "../brushableHistogram";
|
||||
@connect(state => ({
|
||||
obsAnnotations: _.get(state.controls.world, "obsAnnotations", null),
|
||||
colorAccessor: state.controls.colorAccessor,
|
||||
colorScale: state.controls.colorScale,
|
||||
colorScale: state.controls.colors.scale,
|
||||
selectionUpdate: _.get(state.controls, "crossfilter.updateTime", null),
|
||||
schema: _.get(state.controls.world, "schema", null)
|
||||
}))
|
||||
|
||||
@@ -99,7 +99,7 @@ const continuous = (selectorId, colorscale, colorAccessor) => {
|
||||
|
||||
@connect(state => ({
|
||||
colorAccessor: state.controls.colorAccessor,
|
||||
colorScale: state.controls.colorScale,
|
||||
colorScale: state.controls.colors.scale,
|
||||
responsive: state.responsive
|
||||
}))
|
||||
class ContinuousLegend extends React.Component {
|
||||
|
||||
@@ -30,7 +30,7 @@ import { World } from "../../util/stateManager";
|
||||
universe: state.controls.universe,
|
||||
crossfilter: state.controls.crossfilter,
|
||||
responsive: state.responsive,
|
||||
colorRGB: _.get(state.controls, "colorRGB", null),
|
||||
colorRGB: _.get(state.controls, "colors.rgb", null),
|
||||
opacityForDeselectedCells: state.controls.opacityForDeselectedCells,
|
||||
selectionUpdate: _.get(state.controls, "crossfilter.updateTime", null),
|
||||
resettingInterface: state.controls.resettingInterface,
|
||||
@@ -159,11 +159,7 @@ class Graph extends React.Component {
|
||||
}
|
||||
|
||||
// Colors for each point - a cached value that only changes when
|
||||
// the cell metadata changes (done by updateCellColors middleware).
|
||||
// NOTE: this is a slightly pessimistic assumption, as the metadata
|
||||
// could have changed for some other reason, but for now color is
|
||||
// the only metadata that changes client-side. If this is problematic,
|
||||
// we could add some sort of color-specific indicator to the app state.
|
||||
// the cell metadata changes.
|
||||
if (!renderCache.colors || colorRGB !== prevProps.colorRGB) {
|
||||
const rgb = colorRGB;
|
||||
if (!renderCache.colors) {
|
||||
|
||||
@@ -44,9 +44,9 @@ import finiteExtent from "../../util/finiteExtent";
|
||||
return {
|
||||
world,
|
||||
|
||||
colorRGB: state.controls.colorRGB,
|
||||
colorRGB: _.get(state.controls, "colors.rgb", null),
|
||||
colorScale: _.get(state.controls, "colors.scale", null),
|
||||
colorAccessor: state.controls.colorAccessor,
|
||||
colorScale: state.controls.colorScale,
|
||||
|
||||
// Accessors are var/gene names (strings)
|
||||
scatterplotXXaccessor,
|
||||
|
||||
Reference in New Issue
Block a user