mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 07:08:11 +08:00
graph needs to know about first time rendering
This commit is contained in:
@@ -211,9 +211,12 @@ class Graph extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
/* invisibly handles the initial null vs integer case as well as resize events */
|
|
||||||
prevProps.responsive.height !== this.props.responsive.height ||
|
prevProps.responsive.height !== this.props.responsive.height ||
|
||||||
prevProps.responsive.width !== this.props.responsive.width
|
prevProps.responsive.width !== this.props.responsive.width ||
|
||||||
|
/* first time */
|
||||||
|
(this.props.responsive.height &&
|
||||||
|
this.props.responsive.width &&
|
||||||
|
!this.state.svg)
|
||||||
) {
|
) {
|
||||||
/* clear out whatever was on the div, even if nothing, but usually the brushes etc */
|
/* clear out whatever was on the div, even if nothing, but usually the brushes etc */
|
||||||
d3.select("#graphAttachPoint")
|
d3.select("#graphAttachPoint")
|
||||||
|
|||||||
Reference in New Issue
Block a user