mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 21:18:11 +08:00
don't rerender continuous scale on responsive
This commit is contained in:
@@ -103,7 +103,11 @@ class ContinuousLegend extends React.Component {
|
|||||||
this.state = {};
|
this.state = {};
|
||||||
}
|
}
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
if (nextProps.colorAccessor !== this.props.colorAccessor) {
|
if (
|
||||||
|
nextProps.colorAccessor !== this.props.colorAccessor ||
|
||||||
|
nextProps.responsive.height !== this.props.responsive.height ||
|
||||||
|
nextProps.responsive.width !== this.props.responsive.width
|
||||||
|
) {
|
||||||
/* always remove it, if it's not continuous we don't put it back. */
|
/* always remove it, if it's not continuous we don't put it back. */
|
||||||
d3
|
d3
|
||||||
.select("#continuous_legend")
|
.select("#continuous_legend")
|
||||||
|
|||||||
Reference in New Issue
Block a user