mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
purify getDefaultAppState by removing name
This commit is contained in:
parent
ade2565f49
commit
fe973e3513
10 changed files with 38 additions and 12 deletions
|
@ -15,6 +15,7 @@ import {
|
|||
DEFAULT_VERTICAL_ALIGN,
|
||||
} from "../constants";
|
||||
import { getDefaultAppState } from "../appState";
|
||||
import { getNewSceneName } from "../utils";
|
||||
|
||||
const getFontFamilyByName = (fontFamilyName: string): FontFamily => {
|
||||
for (const [id, fontFamilyString] of Object.entries(FONT_FAMILY)) {
|
||||
|
@ -166,6 +167,7 @@ const restoreAppState = (
|
|||
|
||||
return {
|
||||
...nextAppState,
|
||||
name: appState.name ?? localAppState?.name ?? getNewSceneName(),
|
||||
offsetLeft: appState.offsetLeft || 0,
|
||||
offsetTop: appState.offsetTop || 0,
|
||||
// Migrates from previous version where appState.zoom was a number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue