chore: fix various typos (#4857)

Found via `codespell -q 3 -S ./src/locales,./yarn.lock,./src/packages/excalidraw/yarn.lock -L afterall,doubleclick,originaly,reenable,whats,sur`
This commit is contained in:
luzpaz 2022-03-02 01:07:12 -05:00 committed by GitHub
parent 49172ac2d3
commit c5a7723185
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 39 additions and 39 deletions

View file

@ -646,7 +646,7 @@ const getCorners = (
// Returns intersection of `line` with `segment`, with `segment` moved by
// `gap` in its polar direction.
// If intersection conincides with second segment point returns empty array.
// If intersection coincides with second segment point returns empty array.
const intersectSegment = (
line: GA.Line,
segment: [GA.Point, GA.Point],

View file

@ -401,7 +401,7 @@ export class LinearElementEditor {
ret.hitElement = element;
} else {
// You might be wandering why we are storing the binding elements on
// LinearElementEditor and passing them in, insted of calculating them
// LinearElementEditor and passing them in, instead of calculating them
// from the end points of the `linearElement` - this is to allow disabling
// binding (which needs to happen at the point the user finishes moving
// the point).

View file

@ -32,7 +32,7 @@ describe("getPerfectElementSize", () => {
expect(width).toEqual(135);
expect(height).toEqual(135);
});
it("should return height:0 and width:0 when width and heigh are 0", () => {
it("should return height:0 and width:0 when width and height are 0", () => {
const { height, width } = getPerfectElementSize("arrow", 0, 0);
expect(width).toEqual(0);
expect(height).toEqual(0);

View file

@ -114,7 +114,7 @@ export const textWysiwyg = ({
let maxHeight = updatedElement.height;
let width = updatedElement.width;
// Set to element height by default since thats
// Set to element height by default since that's
// what is going to be used for unbounded text
let height = updatedElement.height;
if (container && updatedElement.containerId) {
@ -170,7 +170,7 @@ export const textWysiwyg = ({
const initialLength = editable.value.length;
editable.value = updatedElement.originalText;
// restore cursor positon after value updated so it doesn't
// restore cursor position after value updated so it doesn't
// go to the end of text when container auto expanded
if (
initialSelectionStart === initialSelectionEnd &&
@ -275,7 +275,7 @@ export const textWysiwyg = ({
// as that gets updated below
const lines = editable.scrollHeight / getApproxLineHeight(font);
// auto increase height only when lines > 1 so its
// measured correctly and vertically alignes for
// measured correctly and vertically aligns for
// first line as well as setting height to "auto"
// doubles the height as soon as user starts typing
if (isBoundToContainer(element) && lines > 1) {
@ -414,7 +414,7 @@ export const textWysiwyg = ({
};
/**
* @returns indeces of start positions of selected lines, in reverse order
* @returns indices of start positions of selected lines, in reverse order
*/
const getSelectedLinesStartIndices = () => {
let { selectionStart, selectionEnd, value } = editable;