Browse Source

createDecorationsCollection

Fizz 2 năm trước cách đây
mục cha
commit
01a48285c1

+ 1 - 2
website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js

@@ -15,8 +15,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
 	language: "javascript",
 });
 
-var decorations = editor.deltaDecorations(
-	[],
+var decorations = editor.createDecorationsCollection(
 	[
 		{
 			range: new monaco.Range(3, 1, 5, 1),

+ 1 - 2
website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js

@@ -17,8 +17,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
 	contextmenu: false,
 });
 
-var decorations = editor.deltaDecorations(
-	[],
+var decorations = editor.createDecorationsCollection(
 	[
 		{
 			range: new monaco.Range(3, 1, 3, 1),

+ 1 - 2
website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js

@@ -16,8 +16,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
 	glyphMargin: true,
 });
 
-var decorations = editor.deltaDecorations(
-	[],
+var decorations = editor.createDecorationsCollection(
 	[
 		{
 			range: new monaco.Range(3, 1, 3, 1),