You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
success/src/appState.ts

29 lines
748 B
TypeScript

import { AppState } from "./types";
import { getDateTime } from "./utils";
const DEFAULT_PROJECT_NAME = `excalidraw-${getDateTime()}`;
export function getDefaultAppState(): AppState {
return {
draggingElement: null,
resizingElement: null,
editingElement: null,
elementType: "selection",
elementLocked: false,
exportBackground: true,
currentItemStrokeColor: "#000000",
currentItemBackgroundColor: "transparent",
currentItemFillStyle: "hachure",
currentItemStrokeWidth: 1,
currentItemRoughness: 1,
currentItemOpacity: 100,
currentItemFont: "20px Virgil",
viewBackgroundColor: "#ffffff",
scrollX: 0,
scrollY: 0,
cursorX: 0,
cursorY: 0,
name: DEFAULT_PROJECT_NAME,
};
}