mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 07:20:21 +02:00
use a const for default font value (#834)
This commit is contained in:

committed by
GitHub

parent
2131befd7a
commit
1355e0201c
@@ -5,6 +5,7 @@ import {
|
||||
redrawTextBoundingBox,
|
||||
} from "../element";
|
||||
import { KEYS } from "../keys";
|
||||
import { DEFAULT_FONT } from "../appState";
|
||||
|
||||
let copiedStyles: string = "{}";
|
||||
|
||||
@@ -43,7 +44,7 @@ export const actionPasteStyles: Action = {
|
||||
roughness: pastedElement?.roughness,
|
||||
};
|
||||
if (isTextElement(newElement)) {
|
||||
newElement.font = pastedElement?.font || "20px Virgil";
|
||||
newElement.font = pastedElement?.font || DEFAULT_FONT;
|
||||
redrawTextBoundingBox(newElement);
|
||||
}
|
||||
return newElement;
|
||||
|
Reference in New Issue
Block a user