Correct mis-use of "it's"

This commit is contained in:
Dan Wallis 2022-04-13 11:43:59 +01:00
parent ac7daa516f
commit 6af9a2e2a4
No known key found for this signature in database
GPG key ID: 1CB3140D2C4E59EE
14 changed files with 29 additions and 29 deletions

View file

@ -23,14 +23,14 @@ These are the basics. Later we'll see how to other features, such as highlightin
Here's the implementation of dragging a ball:
```js
ball.onmousedown = function(event) {
ball.onmousedown = function(event) {
// (1) prepare to moving: make absolute and on top by z-index
ball.style.position = 'absolute';
ball.style.zIndex = 1000;
// move it out of any current parents directly into body
// to make it positioned relative to the body
document.body.append(ball);
document.body.append(ball);
// centers the ball at (pageX, pageY) coordinates
function moveAt(pageX, pageY) {
@ -93,7 +93,7 @@ So we should listen on `document` to catch it.
## Correct positioning
In the examples above the ball is always moved so, that it's center is under the pointer:
In the examples above the ball is always moved so that its center is under the pointer:
```js
ball.style.left = pageX - ball.offsetWidth / 2 + 'px';