Skip to content

Commit e97ec19

Browse files
committed
Copyediting chapter 19
1 parent a520916 commit e97ec19

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

19_paint.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The first component we'll define is the part of the interface that displays the
174174

175175
{{index "PictureCanvas class", "callback function", "scale constant", "canvas (HTML tag)", "mousedown event", "touchstart event", [state, "of application"]}}
176176

177-
As such, we can define it as a component that only knows about the current picture, not the whole application state. Because it doesn't know how the application as a whole works, it cannot directly dispatch ((action))s. Rather, when responding to pointer events, it calls a callback function provided by the code that created it, which will handle the application-specific parts.
177+
Therefore, we can define it as a component that only knows about the current picture, not the whole application state. Because it doesn't know how the application as a whole works, it cannot directly dispatch ((action))s. Rather, when responding to pointer events, it calls a callback function provided by the code that created it, which will handle the application-specific parts.
178178

179179
```{includeCode: true}
180180
const scale = 10;
@@ -322,7 +322,7 @@ The pointer handler given to `PictureCanvas` calls the currently selected tool w
322322

323323
{{index "reduce method", "map method", [whitespace, "in HTML"], "syncState method"}}
324324

325-
All controls are constructed and stored in `this.controls` so that they can be updated when the application state changes. The call to `reduce` introduces spaces between the controls' DOM elements. That way they don't look so pressed together.
325+
All controls are constructed and stored in `this.controls` so that they can be updated when the application state changes. The call to `reduce` introduces spaces between the controls' DOM elements. That way, they don't look so pressed together.
326326

327327
{{index "select (HTML tag)", "change event", "ToolSelect class", "syncState method"}}
328328

@@ -620,7 +620,7 @@ The `data` property of the object returned by `getImageData` is an array of colo
620620

621621
The two hexadecimal digits per component, as used in our color notation, correspond precisely to the 0 to 255 range—two base-16 digits can express 16^2^ = 256 different numbers. The `toString` method of numbers can be given a base as an argument, so `n.toString(16)` will produce a string representation in base 16. We have to make sure that each number takes up two digits, so the `hex` helper function calls `padStart` to add a leading 0 when necessary.
622622

623-
We can load and save now! That leaves one more feature before we're done.
623+
We can load and save now! That leaves just one more feature before we're done.
624624

625625
## Undo history
626626

@@ -774,7 +774,7 @@ Do this by modifying the `PixelEditor` component. Add a `tabIndex` property of 0
774774

775775
{{index "ctrlKey property", "metaKey property", "control key", "command key"}}
776776

777-
Remember that keyboard events have `ctrlKey` and `metaKey` (for the [command]{keyname} key on Mac) properties that you can use to see whether those keys are held down.
777+
Remember that keyboard events have `ctrlKey` and `metaKey` (for [command]{keyname} on Mac) properties that you can use to see whether those keys are held down.
778778

779779
{{if interactive
780780

@@ -937,7 +937,7 @@ hint}}
937937

938938
{{index "proper lines (exercise)", "line drawing"}}
939939

940-
This is a more advanced exercise than the preceding two, and it will require you to design a solution to a nontrivial problem. Make sure you have plenty of time and ((patience)) before starting to work on this exercise, and don't get discouraged by initial failures.
940+
This is a more advanced exercise than the preceding three, and it will require you to design a solution to a nontrivial problem. Make sure you have plenty of time and ((patience)) before starting to work on this exercise, and don't get discouraged by initial failures.
941941

942942
{{index "draw function", "mousemove event", "touchmove event"}}
943943

0 commit comments

Comments
 (0)