Skip to content

Commit a975676

Browse files
committed
Grammar
1 parent 23b5766 commit a975676

File tree

1 file changed

+3
-3
lines changed
  • 2-ui/3-event-details/4-mouse-drag-and-drop

1 file changed

+3
-3
lines changed

2-ui/3-event-details/4-mouse-drag-and-drop/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ So here we'll see how to implement Drag'n'Drop using mouse events. Not that hard
1515
The basic Drag'n'Drop algorithm looks like this:
1616

1717
1. Catch `mousedown` on a draggable element.
18-
2. Prepare the element to moving (maybe create a copy of it or whatever).
18+
2. Prepare the element for moving (maybe create a copy of it or whatever).
1919
3. Then on `mousemove` move it by changing `left/top` and `position:absolute`.
2020
4. On `mouseup` (button release) -- perform all actions related to a finished Drag'n'Drop.
2121

@@ -58,7 +58,7 @@ ball.onmousedown = function(event) { // (1) start the process
5858
};
5959
```
6060

61-
If we run the code, we can notice something strange. On the beginning of the drag'n'drop, the ball "forks": we start to dragging it's "clone".
61+
If we run the code, we can notice something strange. On the beginning of the drag'n'drop, the ball "forks": we start dragging its "clone".
6262

6363
```online
6464
Here's an example in action:
@@ -178,7 +178,7 @@ In action (inside `<iframe>`):
178178
[iframe src="ball3" height=230]
179179
```
180180
181-
The difference is especially noticeable if we drag the ball by it's right-bottom corner. In the previous example the ball "jumps" under the pointer. Now it fluently follows the cursor from the current position.
181+
The difference is especially noticeable if we drag the ball by its right-bottom corner. In the previous example the ball "jumps" under the pointer. Now it fluently follows the cursor from the current position.
182182
183183
## Detecting droppables
184184

0 commit comments

Comments
 (0)