switch lineNo to lineNumber
This commit is contained in:
parent
e964df2fe2
commit
018a8b970c
6 changed files with 12 additions and 12 deletions
|
@ -15,9 +15,9 @@ export function clearLintMessage() {
|
|||
};
|
||||
}
|
||||
|
||||
export function updateLineNumber(lineNo) {
|
||||
export function updateLineNumber(lineNumber) {
|
||||
return {
|
||||
type: ActionTypes.UPDATE_LINENUMBER,
|
||||
lineNo
|
||||
lineNumber
|
||||
};
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ class Editor extends React.Component {
|
|||
</div>
|
||||
<EditorAccessibility
|
||||
lintMessages={this.props.lintMessages}
|
||||
lineNo={this.props.lineNo}
|
||||
lineNumber={this.props.lineNumber}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -113,7 +113,7 @@ class Editor extends React.Component {
|
|||
|
||||
Editor.propTypes = {
|
||||
lintWarning: PropTypes.bool.isRequired,
|
||||
lineNo: PropTypes.string.isRequired,
|
||||
lineNumber: PropTypes.string.isRequired,
|
||||
lintMessages: PropTypes.array.isRequired,
|
||||
updateLintMessage: PropTypes.func.isRequired,
|
||||
clearLintMessage: PropTypes.func.isRequired,
|
||||
|
|
|
@ -27,7 +27,7 @@ class EditorAccessibility extends React.Component {
|
|||
{messages}
|
||||
</ul>
|
||||
<p> Current line
|
||||
<span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNo} </span>
|
||||
<span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNumber} </span>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
@ -36,7 +36,7 @@ class EditorAccessibility extends React.Component {
|
|||
|
||||
EditorAccessibility.propTypes = {
|
||||
lintMessages: PropTypes.array.isRequired,
|
||||
lineNo: PropTypes.string.isRequired,
|
||||
lineNumber: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default EditorAccessibility;
|
||||
|
|
|
@ -33,7 +33,7 @@ const hijackConsoleScript = `<script>
|
|||
});
|
||||
|
||||
// catch reference errors, via http://stackoverflow.com/a/12747364/2994108
|
||||
window.onerror = function (msg, url, lineNo, columnNo, error) {
|
||||
window.onerror = function (msg, url, lineNumber, columnNo, error) {
|
||||
var string = msg.toLowerCase();
|
||||
var substring = "script error";
|
||||
var data = {};
|
||||
|
@ -41,7 +41,7 @@ const hijackConsoleScript = `<script>
|
|||
if (string.indexOf(substring) > -1){
|
||||
data = 'Script Error: See Browser Console for Detail';
|
||||
} else {
|
||||
data = msg + ' Line: ' + lineNo + 'column: ' + columnNo;
|
||||
data = msg + ' Line: ' + lineNumber + 'column: ' + columnNo;
|
||||
}
|
||||
window.parent.postMessage({
|
||||
method: 'error',
|
||||
|
|
|
@ -175,7 +175,7 @@ class IDEView extends React.Component {
|
|||
isTabIndent={this.props.preferences.isTabIndent}
|
||||
files={this.props.files}
|
||||
lintMessages={this.props.editorAccessibility.lintMessages}
|
||||
lineNo={this.props.editorAccessibility.lineNo}
|
||||
lineNumber={this.props.editorAccessibility.lineNumber}
|
||||
/>
|
||||
<Console
|
||||
consoleEvent={this.props.ide.consoleEvent}
|
||||
|
@ -254,7 +254,7 @@ IDEView.propTypes = {
|
|||
openPreferences: PropTypes.func.isRequired,
|
||||
editorAccessibility: PropTypes.shape({
|
||||
lintMessages: PropTypes.array.isRequired,
|
||||
lineNo: PropTypes.string.isRequired
|
||||
lineNumber: PropTypes.string.isRequired
|
||||
}).isRequired,
|
||||
updateLintMessage: PropTypes.func.isRequired,
|
||||
clearLintMessage: PropTypes.func.isRequired,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as ActionTypes from '../../../constants';
|
||||
|
||||
const initialState = {
|
||||
lineNo: 'line',
|
||||
lineNumber: 'line',
|
||||
lintMessages: []
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@ const editorAccessibility = (state = initialState, action) => {
|
|||
case ActionTypes.CLEAR_LINT_MESSAGE:
|
||||
return Object.assign({}, state, { lintMessages: [] });
|
||||
case ActionTypes.UPDATE_LINENUMBER:
|
||||
return Object.assign({}, state, { lineNo: `line ${action.lineNo}` });
|
||||
return Object.assign({}, state, { lineNumber: `line ${action.lineNumber}` });
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue