Skip to content

Commit 323baaa

Browse files
committed
feat: add option to draw labels without border
1 parent 9dd32f4 commit 323baaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/Label.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<g :transform="`rotate(${-rotation}, ${position.x}, ${position.y})`">
33
<rect
4+
v-if="border"
45
:x="position.x - boxWidth / 2"
56
:y="position.y - boxHeight / 2 - 0.5"
67
:width="boxWidth"
@@ -35,12 +36,14 @@ const props = withDefaults(
3536
color?: Color;
3637
position?: PossibleVector2;
3738
rotation?: number;
39+
border?: boolean;
3840
text: string;
3941
}>(),
4042
{
4143
size: "normal",
4244
position: () => new Vector2(),
4345
rotation: 0,
46+
border: true,
4447
},
4548
);
4649

0 commit comments

Comments
 (0)