fix: Replace hard coded font family with const value in addFrameLabelsAsTextElements (#7269)

This commit is contained in:
zsviczian 2023-11-11 10:04:02 +01:00 committed by GitHub
parent 02cc8440c4
commit af6b81df40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ import { distance, getFontString } from "../utils";
import { AppState, BinaryFiles } from "../types"; import { AppState, BinaryFiles } from "../types";
import { import {
DEFAULT_EXPORT_PADDING, DEFAULT_EXPORT_PADDING,
FONT_FAMILY,
FRAME_STYLE, FRAME_STYLE,
SVG_NS, SVG_NS,
THEME_FILTER, THEME_FILTER,
@ -105,7 +106,7 @@ const addFrameLabelsAsTextElements = (
let textElement: Mutable<ExcalidrawTextElement> = newTextElement({ let textElement: Mutable<ExcalidrawTextElement> = newTextElement({
x: element.x, x: element.x,
y: element.y - FRAME_STYLE.nameOffsetY, y: element.y - FRAME_STYLE.nameOffsetY,
fontFamily: 4, fontFamily: FONT_FAMILY.Assistant,
fontSize: FRAME_STYLE.nameFontSize, fontSize: FRAME_STYLE.nameFontSize,
lineHeight: lineHeight:
FRAME_STYLE.nameLineHeight as ExcalidrawTextElement["lineHeight"], FRAME_STYLE.nameLineHeight as ExcalidrawTextElement["lineHeight"],