Skip to content

Commit

Permalink
docs(core-utils): Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Oct 3, 2023
1 parent ceaf072 commit 0cd4bd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core-utils/src/itinerary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export function legElevationAtDistance(
const elevDistanceSpan = points[i][0] - start[0];
if (distance >= traversed && distance <= traversed + elevDistanceSpan) {
// Distance falls within this point and the previous one;
// compute & return iterpolated elevation value
// compute & return interpolated elevation value
if (start[1] === null) {
console.warn(
"Elevation value does not exist for distance.",
Expand Down Expand Up @@ -369,7 +369,7 @@ export function getElevationProfile(
* @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
*/
export function getTextWidth(text: string, font = "22px Arial"): number {
// Create custom type for function including re-used canvas object
// Create custom type for function including reused canvas object
type GetTextWidth = typeof getTextWidth & { canvas: HTMLCanvasElement };

// re-use canvas object for better performance

Check failure on line 375 in packages/core-utils/src/itinerary.ts

View workflow job for this annotation

GitHub Actions / Check for spelling errors

re-use ==> reuse
Expand Down
2 changes: 1 addition & 1 deletion packages/core-utils/src/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export function expandOtpFlexMode(mode) {
const modes = reduceOtpFlexModes(mode.split(","));
return modes
.map(m => {
// If both the expanded and shrunk modes are included, remove the exapnded one
// If both the expanded and shrunk modes are included, remove the expanded one
if (m === "FLEX_EGRESS" || m === "FLEX_ACCESS" || m === "FLEX_DIRECT") {
if (mode.includes("FLEX")) return "";
}
Expand Down

0 comments on commit 0cd4bd8

Please sign in to comment.