Skip to content

Commit 8feb2ef

Browse files
committed
fix(image): rect label text coordinate
1 parent ff9ba13 commit 8feb2ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/image/src/annotations/Rect.annotation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class AnnotationRect extends Annotation<RectData, RectStyle> {
7575
new DomPortal({
7676
content: this.generateLabelDom(labelText),
7777
getPosition: (shape, container) => ({
78-
x: shape.dynamicCoordinate[0].x,
78+
x: shape.dynamicCoordinate[0].x - Annotation.strokeWidth / 2,
7979
y: shape.dynamicCoordinate[0].y - container.clientHeight,
8080
}),
8181
order: data.order,

0 commit comments

Comments
 (0)