Browse Source

Fix pasting styles on text elements (#833)

Faustino Kialungila 5 năm trước cách đây
mục cha
commit
2131befd7a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/actions/actionStyles.ts

+ 1 - 1
src/actions/actionStyles.ts

@@ -43,7 +43,7 @@ export const actionPasteStyles: Action = {
             roughness: pastedElement?.roughness,
           };
           if (isTextElement(newElement)) {
-            newElement.font = pastedElement?.font;
+            newElement.font = pastedElement?.font || "20px Virgil";
             redrawTextBoundingBox(newElement);
           }
           return newElement;