Skip to content

Commit 6d0a94b

Browse files
authored
Merge pull request #12 from dannyhp1/develop
Added more comments to rest of components.
2 parents 0d84fe7 + 42f9028 commit 6d0a94b

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

src/App/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class App extends Component {
158158

159159
/**
160160
* Adds the result message to the log.
161+
* @param object result Results of POST request containing build status and running message.
161162
*/
162163
addToLog = (result) => {
163164
// Before processing the new result, we must pop the message 'Running your code...' off and re-enable the button.

src/components/CodeEditor.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,22 @@ class CodeEditor extends Component {
2121
this.onResize = this.onResize.bind(this)
2222
}
2323

24+
/**
25+
* Resizes editor based on window size.
26+
* @param string w Width to set for editor.
27+
* @param string h Height to set for editor.
28+
*/
2429
onResize = (w, h) => {
2530
this.setState({
26-
editorHeight: h,
27-
editorWidth: w
31+
editorWidth: w,
32+
editorHeight: h
2833
})
2934
}
3035

36+
/**
37+
* Changes the value in the editor.
38+
* @param string value Source code in the editor as a string.
39+
*/
3140
onChange = (value) => {
3241
this.props.onChange(value)
3342
}

src/components/ResultsEditor.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ class ResultsEditor extends Component {
1414
this.onResize = this.onResize.bind(this)
1515
}
1616

17+
/**
18+
* Resizes editor based on window size.
19+
* @param string w Width to set for editor.
20+
* @param string h Height to set for editor.
21+
*/
1722
onResize = (w, h) => {
1823
this.setState({
19-
editorHeight: h,
20-
editorWidth: w
24+
editorWidth: w,
25+
editorHeight: h
2126
})
2227
}
2328

0 commit comments

Comments
 (0)