mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 22:40:54 +02:00
fix: restoreElementWithProperties drops "parent" property (#5742)
Co-authored-by: Yosyp Buchma <yo@yosyp.co> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import throttle from "lodash.throttle";
|
||||
import { newElementWith } from "../../element/mutateElement";
|
||||
import { BroadcastedExcalidrawElement } from "./reconciliation";
|
||||
import { encryptData } from "../../data/encryption";
|
||||
import { PRECEDING_ELEMENT_KEY } from "../../constants";
|
||||
|
||||
class Portal {
|
||||
collab: TCollabClass;
|
||||
@@ -152,7 +153,7 @@ class Portal {
|
||||
acc.push({
|
||||
...element,
|
||||
// z-index info for the reconciler
|
||||
parent: idx === 0 ? "^" : elements[idx - 1]?.id,
|
||||
[PRECEDING_ELEMENT_KEY]: idx === 0 ? "^" : elements[idx - 1]?.id,
|
||||
});
|
||||
}
|
||||
return acc;
|
||||
|
Reference in New Issue
Block a user