mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-21 08:20:24 +02:00
fix: cleanup legacy element.rawText
(obsidian) (#9203)
This commit is contained in:
@@ -238,6 +238,8 @@ const restoreElementWithProperties = <
|
|||||||
const restoreElement = (
|
const restoreElement = (
|
||||||
element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>,
|
element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>,
|
||||||
): typeof element | null => {
|
): typeof element | null => {
|
||||||
|
element = { ...element };
|
||||||
|
|
||||||
// NOTE (mtolmacs): This is a temporary check to detect extremely large
|
// NOTE (mtolmacs): This is a temporary check to detect extremely large
|
||||||
// element position or sizing
|
// element position or sizing
|
||||||
if (
|
if (
|
||||||
@@ -255,6 +257,10 @@ const restoreElement = (
|
|||||||
|
|
||||||
switch (element.type) {
|
switch (element.type) {
|
||||||
case "text":
|
case "text":
|
||||||
|
// temp fix: cleanup legacy obsidian-excalidraw attribute else it'll
|
||||||
|
// conflict when porting between the apps
|
||||||
|
delete (element as any).rawText;
|
||||||
|
|
||||||
let fontSize = element.fontSize;
|
let fontSize = element.fontSize;
|
||||||
let fontFamily = element.fontFamily;
|
let fontFamily = element.fontFamily;
|
||||||
if ("font" in element) {
|
if ("font" in element) {
|
||||||
|
Reference in New Issue
Block a user