Skip to content

Commit d5d10a8

Browse files
CapnKernelMitch Davis
andauthored
Assorted spelling, grammar, and casing fixes to comments and strings (#162)
Co-authored-by: Mitch Davis <mjd@afork.com>
1 parent ecded1d commit d5d10a8

40 files changed

Lines changed: 117 additions & 116 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ KiCanvas is very early in its development and there's a ton of stuff that hasn't
2828

2929
## Known issues
3030

31-
In general, please check the [GitHub issues] page before filing new issues. Some high-level things that we known won't work:
31+
In general, please check the [GitHub issues] page before filing new issues. Some high-level things that we know won't work:
3232

3333
- Any KiCAD 5 files, KiCanvas can only parse files from KiCAD 6 and later.
3434
- Some KiCAD 7 features might not be fully implemented, such as custom fonts in schematics.

‎docs/docs/license.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ derivative works.
3333

3434
This project contains copies or makes use of other works. These works and their respective license and terms are:
3535

36-
- Earcut by Mapbox, licensed under the ISC license. Retrived from https://github.com/mapbox/earcut.
36+
- Earcut by Mapbox, licensed under the ISC license. Retrieved from https://github.com/mapbox/earcut.
3737
- Newstroke by Vladimir Uryvaev, Lingdong Huang, Adobe, and KiCAD contributors. Originally licensed under Creative Commons CC0 1.0, amended with an MIT-like license, and utilizes glyphs that are licensed under the SIL Open Font License Version 1.1.
3838
- Material Symbols by Google, licensed under the Apache License, Version 2.0. Retrieved from https://github.com/google/material-design-icons.
3939
- Nunito by Vernon Adams, Manvel Shmavonyan, licensed under the Open Font License. Retrieved from https://fonts.google.com/specimen/Nunito/about

‎src/base/dom/size-observer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { IDisposable } from "../disposable";
99
type ResizeObserverCallback = (target: HTMLElement) => void;
1010

1111
/**
12-
* Wrapper over ResizeObserver that implmenets IDisposable
12+
* Wrapper over ResizeObserver that implements IDisposable
1313
*/
1414
export class SizeObserver implements IDisposable {
1515
#observer: ResizeObserver;

‎src/base/events.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import type { IDisposable } from "./disposable";
88

99
/**
10-
* Adds an event listener and wraps it as a Disposable. When disposed, the
10+
* Adds an event listener and wraps it as a Disposable. When disposed of, the
1111
* event listener is removed from the target.
1212
*/
1313
export function listen<K extends keyof GlobalEventHandlersEventMap>(

‎src/base/math/angle.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class Angle {
8484
}
8585

8686
/**
87-
* Returns a new Angle representing the different of this angle and the given angle.
87+
* Returns a new Angle representing the difference between this angle and the given angle.
8888
*/
8989
sub(other: AngleLike) {
9090
const diff = this.radians - new Angle(other).radians;

‎src/base/math/arc.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class Arc {
4747
const mid_angle = mid.sub(center).angle;
4848
const end_angle = end.sub(center).angle;
4949

50-
// calcuate the arc angle
50+
// calculate the arc angle
5151
let arc_angle;
5252
const start_to_mid = mid_angle.sub(start_angle).normalize();
5353
const start_to_end = end_angle.sub(start_angle).normalize();
@@ -60,8 +60,8 @@ export class Arc {
6060
arc_angle = Angle.from_degrees(360).sub(start_to_end);
6161
}
6262

63-
// although kicad always create a clockwise arc,
64-
// but we can import a counter-clockwise arc from other EDA/CAD using KiCad
63+
// although KiCad always creates clockwise arcs, the file may contain
64+
// counter-clockwise arcs through imports from other EDA/CAD programs
6565
let arc_start;
6666
let direction: ArcDirection;
6767

‎src/base/math/bbox.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class BBox {
110110
}
111111

112112
/**
113-
* @returns true if the bbox has a non-zero area
113+
* @returns true if the BBox has a non-zero area
114114
*/
115115
get valid() {
116116
return (

‎src/base/math/camera2.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class Camera2 {
106106
}
107107

108108
/**
109-
* Apply this camera to a 2d canvas
109+
* Apply this camera to a 2D canvas
110110
*
111111
* A simple convenience method that sets the canvas's transform to
112112
* the camera's transformation matrix.

‎src/base/math/matrix3.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class Matrix3 {
8888
}
8989

9090
/**
91-
* @returns a new matrix representing a 2d orthographic projection
91+
* @returns a new matrix representing a 2D orthographic projection
9292
*/
9393
static orthographic(width: number, height: number): Matrix3 {
9494
// prettier-ignore
@@ -147,7 +147,7 @@ export class Matrix3 {
147147
}
148148

149149
/**
150-
* Transforms a list of vector by a given matrix, which may be null.
150+
* Transforms a list of vectors by a given matrix, which may be null.
151151
*/
152152
static transform_all(mat: Matrix3 | null, vecs: Vec2[]): Vec2[] {
153153
if (!mat) {
@@ -237,7 +237,7 @@ export class Matrix3 {
237237
}
238238

239239
/**
240-
* @returns A new matrix representing a 2d translation
240+
* @returns A new matrix representing a 2D translation
241241
*/
242242
static translation(x: number, y: number): Matrix3 {
243243
// prettier-ignore
@@ -265,7 +265,7 @@ export class Matrix3 {
265265
}
266266

267267
/**
268-
* @returns {Matrix3} A new matrix representing a 2d scale
268+
* @returns {Matrix3} A new matrix representing a 2D scale
269269
*/
270270
static scaling(x: number, y: number): Matrix3 {
271271
// prettier-ignore
@@ -293,7 +293,7 @@ export class Matrix3 {
293293
}
294294

295295
/**
296-
* @returns A new matrix representing a 2d rotation
296+
* @returns A new matrix representing a 2D rotation
297297
*/
298298
static rotation(angle: AngleLike): Matrix3 {
299299
const theta = new Angle(angle).radians;

‎src/base/web-components/decorators.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const default_attribute_converter = {
6767
return `${value}`;
6868
default:
6969
throw new Error(
70-
`Can not convert type "${type}" and value "${value} to attribute`,
70+
`Cannot convert type "${type}" and value "${value} to attribute`,
7171
);
7272
}
7373
},
@@ -81,7 +81,7 @@ const default_attribute_converter = {
8181
return value === null ? null : Number(value);
8282
default:
8383
throw new Error(
84-
`Can not convert type "${type}" and value "${value} to attribute`,
84+
`Cannot convert type "${type}" and value "${value} to attribute`,
8585
);
8686
}
8787
},

0 commit comments

Comments
 (0)