mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
update data restore to keep fractional index
This commit is contained in:
parent
de32256466
commit
5c1787bdf4
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ import {
|
||||||
measureBaseline,
|
measureBaseline,
|
||||||
} from "../element/textElement";
|
} from "../element/textElement";
|
||||||
import { normalizeLink } from "./url";
|
import { normalizeLink } from "./url";
|
||||||
import { generateConsistentFractionalIndex } from "../fractionalIndex";
|
import { normalizeFractionalIndexing } from "../zindex";
|
||||||
|
|
||||||
type RestoredAppState = Omit<
|
type RestoredAppState = Omit<
|
||||||
AppState,
|
AppState,
|
||||||
|
@ -583,7 +583,7 @@ export const restore = (
|
||||||
elementsConfig?: { refreshDimensions?: boolean; repairBindings?: boolean },
|
elementsConfig?: { refreshDimensions?: boolean; repairBindings?: boolean },
|
||||||
): RestoredDataState => {
|
): RestoredDataState => {
|
||||||
return {
|
return {
|
||||||
elements: generateConsistentFractionalIndex(
|
elements: normalizeFractionalIndexing(
|
||||||
restoreElements(data?.elements, localElements, elementsConfig),
|
restoreElements(data?.elements, localElements, elementsConfig),
|
||||||
),
|
),
|
||||||
appState: restoreAppState(data?.appState, localAppState || null),
|
appState: restoreAppState(data?.appState, localAppState || null),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue