Skip to content

Commit cc15c30

Browse files
authored
Merge pull request #197 from bantya/patch-1
Fixed improper numbering in main function code.
2 parents c45be70 + 24f554e commit cc15c30

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tutorials/how-to-draw-lines/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ A couple of things to note:
112112
In this step, we'll build out the main function, `createLinesCommand`, that we added in the first step. Each of the numbered comments are explained below the code:
113113

114114
```js
115-
function createLinesCommand(selection) { // [1]
115+
function createLinesCommand(selection) { // [1]
116116

117117
let lines = []; // [2]
118118

@@ -135,8 +135,8 @@ function createLinesCommand(selection) { // [1]
135135
selection.editContext.addChild(line) // [4.vii]
136136
});
137137

138-
selection.items = lines; // [11]
139-
commands.group(); // [12]
138+
selection.items = lines; // [5]
139+
commands.group(); // [6]
140140
}
141141
```
142142

@@ -151,8 +151,8 @@ function createLinesCommand(selection) { // [1]
151151
1. Set the width of the stroke using `strokeWidth` property.
152152
1. Append the line object into the `lines` array.
153153
1. Insert the line into the edit context using the `selection.editContext.addChild` method. This step adds the line to the document's scenegraph.
154-
11. Now that all of the `Line` objects have been added to the scenegraph, set the document's current selection to be those `Line` objects.
155-
12. Use the `group` command to combine all of the currently-selected objects (the `Line` objects) into a single group object.
154+
5. Now that all of the `Line` objects have been added to the scenegraph, set the document's current selection to be those `Line` objects.
155+
6. Use the `group` command to combine all of the currently-selected objects (the `Line` objects) into a single group object.
156156

157157
### 6. Run the plugin
158158

0 commit comments

Comments
 (0)