Update dimensions only when the tool area state changes

master
Torjus 2018-07-16 16:42:55 +02:00
parent 8aa7c9a8e4
commit 44058625b9
1 changed files with 4 additions and 2 deletions

View File

@ -67,9 +67,11 @@ class Peers extends React.Component
window.removeEventListener('resize', this.resizeUpdate.bind(this)); window.removeEventListener('resize', this.resizeUpdate.bind(this));
} }
componentDidUpdate() componentDidUpdate(prevProps)
{ {
this.updateDimensions(); if (prevProps.toolAreaOpen !== this.props.toolAreaOpen) {
this.updateDimensions();
}
} }
render() render()