mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 01:48:11 +08:00
refactor categorical controls state (#1549)
* refactor categorical controls state * lint * fix race condition in tests * fix typo * add missing update on subset * remove obsolete code * update jest and puppeteer major version; update all minors * update when label changes * remove lint from tests; increase timeouts in e2e tests * changes in response to PR review * lint * more PR comment changes * more PR comment fixes * lint * more PR comment resolutions
This commit is contained in:
@@ -40,10 +40,7 @@ class CentroidLabels extends PureComponent {
|
||||
if (!colorAccessor || labels.size === undefined || labels.size === 0)
|
||||
return null;
|
||||
|
||||
const {
|
||||
categoryValueIndices,
|
||||
categoryValueSelected,
|
||||
} = categoricalSelection?.[colorAccessor];
|
||||
const category = categoricalSelection[colorAccessor];
|
||||
|
||||
const labelSVGS = [];
|
||||
let fontSize = "15px";
|
||||
@@ -57,7 +54,7 @@ class CentroidLabels extends PureComponent {
|
||||
fontWeight = "800";
|
||||
}
|
||||
|
||||
const selected = categoryValueSelected[categoryValueIndices.get(label)];
|
||||
const selected = category.get(label) ?? true;
|
||||
|
||||
// Mirror LSB middle truncation
|
||||
let displayLabel = label;
|
||||
|
||||
Reference in New Issue
Block a user