Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

move the excalidraw props to correct file and typo fix (#1907)

Aakansha Doshi953cd5563caa
diff --git a/src/components/App.tsx b/src/components/App.tsx
index cce721cb19..7f127c3737 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -55,10 +55,9 @@ import {
import Portal from "./Portal";
import { renderScene } from "../renderer";
-import { AppState, GestureEvent, Gesture } from "../types";
+import { AppState, GestureEvent, Gesture, ExcalidrawProps } from "../types";
import {
ExcalidrawElement,
- ExcalidrawProps,
ExcalidrawTextElement,
NonDeleted,
ExcalidrawGenericElement,
@@ -126,7 +125,7 @@ import {
LOCAL_STORAGE_KEY_COLLAB_FORCE_FLAG,
} from "../constants";
import {
- INITAL_SCENE_UPDATE_TIMEOUT,
+ INITIAL_SCENE_UPDATE_TIMEOUT,
TAP_TWICE_TIMEOUT,
SYNC_FULL_SCENE_INTERVAL_MS,
TOUCH_CTX_MENU_TIMEOUT,
@@ -247,7 +246,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
height: window.innerHeight,
};
- constructor(props: any) {
+ constructor(props: ExcalidrawProps) {
super(props);
const defaultAppState = getDefaultAppState();
@@ -1035,7 +1034,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
// initial SCENE_UPDATE message
const initializationTimer = setTimeout(
initialize,
- INITAL_SCENE_UPDATE_TIMEOUT,
+ INITIAL_SCENE_UPDATE_TIMEOUT,
);
const updateScene = (
diff --git a/src/element/types.ts b/src/element/types.ts
index ffba4b12e1..de5a9f3ca2 100644
--- a/src/element/types.ts
+++ b/src/element/types.ts
@@ -77,8 +77,3 @@ export type VerticalAlign = "top" | "middle";
export type FontFamily = keyof typeof FONT_FAMILY;
export type FontString = string & { _brand: "fontString" };
-
-export interface ExcalidrawProps {
- width: number;
- height: number;
-}
diff --git a/src/time_constants.ts b/src/time_constants.ts
index 96400d6116..27423b8f6e 100644
--- a/src/time_constants.ts
+++ b/src/time_constants.ts
@@ -1,5 +1,5 @@
// time in milliseconds
export const TAP_TWICE_TIMEOUT = 300;
-export const INITAL_SCENE_UPDATE_TIMEOUT = 5000;
+export const INITIAL_SCENE_UPDATE_TIMEOUT = 5000;
export const SYNC_FULL_SCENE_INTERVAL_MS = 20000;
export const TOUCH_CTX_MENU_TIMEOUT = 500;
diff --git a/src/types.ts b/src/types.ts
index f6c16a36a3..9dd5952352 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -107,3 +107,8 @@ export type SocketUpdateData = SocketUpdateDataSource[keyof SocketUpdateDataSour
};
export type LibraryItems = readonly NonDeleted<ExcalidrawElement>[][];
+
+export interface ExcalidrawProps {
+ width: number;
+ height: number;
+}