Merge pull request #740 from nikeee/fix-linenumbers

Fix line number API usage
pull/577/head^2
Peng Lyu 2018-03-08 11:44:44 -08:00 committed by GitHub
commit 41bb016283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line",
language: "javascript",
lineNumbers: false,
lineNumbers: "off",
roundedSelection: false,
scrollBeyondLastLine: false,
readOnly: false,
@ -52,7 +52,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
});
setTimeout(function() {
editor.updateOptions({
lineNumbers: true
lineNumbers: "on"
});
}, 2000);

View File

@ -6,7 +6,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line",
language: "javascript",
lineNumbers: false,
lineNumbers: "off",
roundedSelection: false,
scrollBeyondLastLine: false,
readOnly: false,
@ -14,6 +14,6 @@ var editor = monaco.editor.create(document.getElementById("container"), {
});
setTimeout(function() {
editor.updateOptions({
lineNumbers: true
lineNumbers: "on"
});
}, 2000);