diff --git a/src/App/App.js b/src/App/App.js index abf8b8d..390f139 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -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. diff --git a/src/components/CodeEditor.js b/src/components/CodeEditor.js index c2587ab..c3d13b0 100644 --- a/src/components/CodeEditor.js +++ b/src/components/CodeEditor.js @@ -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) } diff --git a/src/components/ResultsEditor.js b/src/components/ResultsEditor.js index 172a7dc..3fd975f 100644 --- a/src/components/ResultsEditor.js +++ b/src/components/ResultsEditor.js @@ -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 }) }