Skip to content

Commit

Permalink
Merge pull request #29 from 3yaa3yaa/dev
Browse files Browse the repository at this point in the history
1.6.1 To change div height accordingly
  • Loading branch information
3yaa3yaa committed Feb 25, 2020
2 parents fc47ff1 + 96b7c3e commit bdc5eaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "treemindmap",
"version": "1.6.0",
"version": "1.6.1",
"description": "",
"main": "build/bundle.js",
"repository": {
Expand Down
7 changes: 1 addition & 6 deletions src/MainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ class MainWindow extends Component {
this.state={height:"0px"};
}

componentDidUpdate(prevProps) {
this.setState({height:this.mainContentRef.clientHeight});
}

_getPreviewScreen()
{
if(this.props.property.previewMode!=Property.previewMode().none)
Expand All @@ -39,11 +35,10 @@ class MainWindow extends Component {

_getMainStyle()
{
return {height: this.state.height};
return {height: this.mainContentRef.clientHeight};
}



render() {
return <div className="MainWindow" style={this._getMainStyle()}>
<div className="MainWindow-Preview">
Expand Down

0 comments on commit bdc5eaf

Please sign in to comment.