Skip to content

Commit

Permalink
fix: Invalid anchor positions for the align box
Browse files Browse the repository at this point in the history
- Their positions don't change along with the directions
  • Loading branch information
miyanokomiya committed Feb 5, 2025
1 parent 9cf9141 commit dd57dcb
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions src/composables/alignHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,30 +299,18 @@ export function newAlignBoxHandler(option: AlignHandlerOption) {
{
type: "resize-by-segment",
index: 1,
p:
alignBox.direction === 0
? {
x: alignBoxRect.x + alignBoxRect.width / 2,
y: alignBoxRect.y + alignBoxRect.height,
}
: {
x: alignBoxRect.x + alignBoxRect.width,
y: alignBoxRect.y + alignBoxRect.height / 2,
},
p: {
x: alignBoxRect.x + alignBoxRect.width,
y: alignBoxRect.y + alignBoxRect.height / 2,
},
},
{
type: "resize-by-segment",
index: 2,
p:
alignBox.direction === 0
? {
x: alignBoxRect.x + alignBoxRect.width,
y: alignBoxRect.y + alignBoxRect.height / 2,
}
: {
x: alignBoxRect.x + alignBoxRect.width / 2,
y: alignBoxRect.y + alignBoxRect.height,
},
p: {
x: alignBoxRect.x + alignBoxRect.width / 2,
y: alignBoxRect.y + alignBoxRect.height,
},
},
];

Expand Down

0 comments on commit dd57dcb

Please sign in to comment.