set text colour for new labels

This commit is contained in:
llama 2025-06-14 17:47:49 +08:00
parent 22e70b2b23
commit 7e0a3f2d12
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -11,6 +11,7 @@ import {
isPointerInBoundingBox,
stopDraw,
TEXT_BACKGROUND_COLOR,
TEXT_COLOR,
TEXT_FONT_FAMILY,
TEXT_PADDING,
} from "./lib";
@ -41,6 +42,7 @@ export const drawText = (canvas: fabric.Canvas, onActivated: Callback): void =>
selectable: true,
strokeWidth: 1,
noScaleCache: false,
fill: TEXT_COLOR,
fontFamily: TEXT_FONT_FAMILY,
backgroundColor: TEXT_BACKGROUND_COLOR,
padding: TEXT_PADDING,