Skip to content

Commit

Permalink
Better default graph size
Browse files Browse the repository at this point in the history
  • Loading branch information
s2t2 committed Nov 2, 2020
1 parent 12ebcf5 commit b3be446
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/_App/BotAnalysis/Networks/TestGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ export default class NetworkGraph extends PureComponent {
componentDidMount(){
console.log("COMPONENT DID MOUNT")
window.addEventListener("resize", this.handleResize)
//const width = this.containerRef.current.clientWidth
this.setState({parsedResponse:"abc123",
//width: width
})
//const width = this.containerRef.current.clientWidth // containerRef is null here
const width = window.innerWidth * 0.74
this.setState({parsedResponse:"abc123", width: width})
}

componentWillUnmount() {
Expand Down

0 comments on commit b3be446

Please sign in to comment.