Skip to content

Commit

Permalink
fix(draw): adjust start text position (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanhuanwa authored Apr 29, 2024
1 parent 35418e5 commit 90246f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-jobs-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@plait/draw': patch
---

adjust start text position
2 changes: 1 addition & 1 deletion packages/draw/src/engines/basic-shapes/star.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const StarEngine: ShapeEngine = createPolygonEngine({
height,
width: width > 0 ? width : 0,
x: elementRectangle.x + ShapeDefaultSpace.rectangleAndText + strokeWidth + originWidth / 4,
y: elementRectangle.y + (elementRectangle.height * 1) / 5 + ((elementRectangle.height * 4) / 5 - height) / 2
y: elementRectangle.y + (elementRectangle.height * 1) / 6 + ((elementRectangle.height * 4) / 5 - height) / 2
};
}
});

0 comments on commit 90246f4

Please sign in to comment.