61be0f7b61
* Render text actions panel on double click * cleanup wysiwyg on click * use `state.editingElement` instead of global to determine whether t ext panel is shown * clarify comment Co-authored-by: David Luzar <luzar.david@gmail.com>
24 lines
595 B
TypeScript
24 lines
595 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",
|
|
exportBackground: true,
|
|
currentItemStrokeColor: "#000000",
|
|
currentItemBackgroundColor: "transparent",
|
|
currentItemFont: "20px Virgil",
|
|
viewBackgroundColor: "#ffffff",
|
|
scrollX: 0,
|
|
scrollY: 0,
|
|
cursorX: 0,
|
|
cursorY: 0,
|
|
name: DEFAULT_PROJECT_NAME
|
|
};
|
|
}
|