graph needs to know about first time rendering

This commit is contained in:
Colin Megill
2018-08-19 19:57:11 -04:00
parent 743eee3d78
commit d550b5503d

View File

@@ -211,9 +211,12 @@ class Graph extends React.Component {
}
if (
/* invisibly handles the initial null vs integer case as well as resize events */
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 */
d3.select("#graphAttachPoint")