Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class App extends Component {

/**
* Adds the result message to the log.
* @param object result Results of POST request containing build status and running message.
*/
addToLog = (result) => {
// Before processing the new result, we must pop the message 'Running your code...' off and re-enable the button.
Expand Down
13 changes: 11 additions & 2 deletions src/components/CodeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,22 @@ class CodeEditor extends Component {
this.onResize = this.onResize.bind(this)
}

/**
* Resizes editor based on window size.
* @param string w Width to set for editor.
* @param string h Height to set for editor.
*/
onResize = (w, h) => {
this.setState({
editorHeight: h,
editorWidth: w
editorWidth: w,
editorHeight: h
})
}

/**
* Changes the value in the editor.
* @param string value Source code in the editor as a string.
*/
onChange = (value) => {
this.props.onChange(value)
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/ResultsEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ class ResultsEditor extends Component {
this.onResize = this.onResize.bind(this)
}

/**
* Resizes editor based on window size.
* @param string w Width to set for editor.
* @param string h Height to set for editor.
*/
onResize = (w, h) => {
this.setState({
editorHeight: h,
editorWidth: w
editorWidth: w,
editorHeight: h
})
}

Expand Down