Skip to content

Commit db23e7a

Browse files
authored
Merge pull request #1802 from Ajaya1000/enhancement/console_window_restore_prevoius_state
[#1776] console will get back to previous height
2 parents 1aa6c17 + 5e7b68d commit db23e7a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

client/modules/IDE/pages/IDEView.jsx

+3-8
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@ class IDEView extends React.Component {
101101
if (nextProps.location !== this.props.location) {
102102
this.props.setPreviousPath(this.props.location.pathname);
103103
}
104-
105-
if (this.props.ide.consoleIsExpanded !== nextProps.ide.consoleIsExpanded) {
106-
this.setState({
107-
consoleSize: nextProps.ide.consoleIsExpanded ? 150 : 29
108-
});
109-
}
110-
111104
if (this.props.ide.sidebarIsExpanded !== nextProps.ide.sidebarIsExpanded) {
112105
this.setState({
113106
sidebarSize: nextProps.ide.sidebarIsExpanded ? 160 : 20
@@ -337,7 +330,9 @@ class IDEView extends React.Component {
337330
<SplitPane
338331
split="horizontal"
339332
primary="second"
340-
size={this.state.consoleSize}
333+
size={
334+
this.props.ide.consoleIsExpanded ? this.state.consoleSize : 29
335+
}
341336
minSize={29}
342337
onChange={(size) => this.setState({ consoleSize: size })}
343338
allowResize={this.props.ide.consoleIsExpanded}

0 commit comments

Comments
 (0)