fix: not properly restoring element stroke and bg colors (#6002)
This commit is contained in:
parent
88c2812949
commit
73a45e1988
@ -33,6 +33,7 @@ import { LinearElementEditor } from "../element/linearElementEditor";
|
|||||||
import { bumpVersion } from "../element/mutateElement";
|
import { bumpVersion } from "../element/mutateElement";
|
||||||
import { getUpdatedTimestamp, updateActiveTool } from "../utils";
|
import { getUpdatedTimestamp, updateActiveTool } from "../utils";
|
||||||
import { arrayToMap } from "../utils";
|
import { arrayToMap } from "../utils";
|
||||||
|
import oc from "open-color";
|
||||||
|
|
||||||
type RestoredAppState = Omit<
|
type RestoredAppState = Omit<
|
||||||
AppState,
|
AppState,
|
||||||
@ -110,8 +111,8 @@ const restoreElementWithProperties = <
|
|||||||
angle: element.angle || 0,
|
angle: element.angle || 0,
|
||||||
x: extra.x ?? element.x ?? 0,
|
x: extra.x ?? element.x ?? 0,
|
||||||
y: extra.y ?? element.y ?? 0,
|
y: extra.y ?? element.y ?? 0,
|
||||||
strokeColor: element.strokeColor,
|
strokeColor: element.strokeColor || oc.black,
|
||||||
backgroundColor: element.backgroundColor,
|
backgroundColor: element.backgroundColor || "transparent",
|
||||||
width: element.width || 0,
|
width: element.width || 0,
|
||||||
height: element.height || 0,
|
height: element.height || 0,
|
||||||
seed: element.seed ?? 1,
|
seed: element.seed ?? 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user