fix perf regression introduced by user anno changes (#1060)

This commit is contained in:
Bruce Martin
2019-11-25 18:16:49 -08:00
committed by GitHub
parent a593e95ab3
commit d2171b9a2f
2 changed files with 4 additions and 5 deletions
@@ -10,7 +10,7 @@ import {
} from "@blueprintjs/core"; } from "@blueprintjs/core";
@connect() @connect()
class Occupancy extends React.Component { class Occupancy extends React.PureComponent {
_WIDTH = 100; _WIDTH = 100;
_HEIGHT = 11; _HEIGHT = 11;
+3 -4
View File
@@ -191,7 +191,8 @@ class CategoryValue extends React.Component {
const worldChange = props.world !== nextProps.world; const worldChange = props.world !== nextProps.world;
const colorAccessorChange = props.colorAccessor !== nextProps.colorAccessor; const colorAccessorChange = props.colorAccessor !== nextProps.colorAccessor;
const annotationsChange = props.annotations !== nextProps.annotations; const annotationsChange = props.annotations !== nextProps.annotations;
const crossfilterChange = props.crossfilter !== nextProps.crossfilter; const crossfilterChange =
props.isUserAnno && props.crossfilter !== nextProps.crossfilter;
const editingLabel = state.editedLabelText !== nextState.editedLabelText; const editingLabel = state.editedLabelText !== nextState.editedLabelText;
return ( return (
@@ -554,9 +555,7 @@ class CategoryValue extends React.Component {
data-testclass="handleDeleteValue" data-testclass="handleDeleteValue"
data-testid={`handleDeleteValue-${metadataField}`} data-testid={`handleDeleteValue-${metadataField}`}
onClick={this.handleDeleteValue} onClick={this.handleDeleteValue}
text={`Delete this label, and reassign all cells to type '${ text={`Delete this label, and reassign all cells to type '${globals.unassignedCategoryLabel}'`}
globals.unassignedCategoryLabel
}'`}
/> />
) : null} ) : null}
</Menu> </Menu>