Skip to content

Commit b3be446

Browse files
committed
Better default graph size
1 parent 12ebcf5 commit b3be446

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/_App/BotAnalysis/Networks/TestGraph.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ export default class NetworkGraph extends PureComponent {
4949
componentDidMount(){
5050
console.log("COMPONENT DID MOUNT")
5151
window.addEventListener("resize", this.handleResize)
52-
//const width = this.containerRef.current.clientWidth
53-
this.setState({parsedResponse:"abc123",
54-
//width: width
55-
})
52+
//const width = this.containerRef.current.clientWidth // containerRef is null here
53+
const width = window.innerWidth * 0.74
54+
this.setState({parsedResponse:"abc123", width: width})
5655
}
5756

5857
componentWillUnmount() {

0 commit comments

Comments
 (0)