mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
use a const for default font value (#834)
This commit is contained in:
parent
2131befd7a
commit
1355e0201c
3 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue