use a const for default font value (#834)

This commit is contained in:
Faustino Kialungila 2020-02-24 16:29:54 +01:00 committed by GitHub
parent 2131befd7a
commit 1355e0201c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,7 @@ import { AppState, FlooredNumber } from "./types";
import { getDateTime } from "./utils";
const DEFAULT_PROJECT_NAME = `excalidraw-${getDateTime()}`;
export const DEFAULT_FONT = "20px Virgil";
export function getDefaultAppState(): AppState {
return {
@ -18,7 +19,7 @@ export function getDefaultAppState(): AppState {
currentItemStrokeWidth: 1,
currentItemRoughness: 1,
currentItemOpacity: 100,
currentItemFont: "20px Virgil",
currentItemFont: DEFAULT_FONT,
viewBackgroundColor: "#ffffff",
scrollX: 0 as FlooredNumber,
scrollY: 0 as FlooredNumber,