mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
parent
facde7ace0
commit
566e6a5ede
24 changed files with 912 additions and 357 deletions
|
@ -3,7 +3,7 @@ import {
|
|||
FontFamily,
|
||||
ExcalidrawSelectionElement,
|
||||
} from "../element/types";
|
||||
import { AppState } from "../types";
|
||||
import { AppState, NormalizedZoomValue } from "../types";
|
||||
import { DataState, ImportedDataState } from "./types";
|
||||
import { isInvisiblySmallElement, getNormalizedDimensions } from "../element";
|
||||
import { isLinearElementType } from "../element/typeChecks";
|
||||
|
@ -161,6 +161,14 @@ const restoreAppState = (
|
|||
...nextAppState,
|
||||
offsetLeft: appState.offsetLeft || 0,
|
||||
offsetTop: appState.offsetTop || 0,
|
||||
/* Migrates from previous version where appState.zoom was a number */
|
||||
zoom:
|
||||
typeof appState.zoom === "number"
|
||||
? {
|
||||
value: appState.zoom as NormalizedZoomValue,
|
||||
translation: defaultAppState.zoom.translation,
|
||||
}
|
||||
: appState.zoom || defaultAppState.zoom,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue