mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix #2 on diamond corners
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
de91f092a7
commit
d478974e0d
1 changed files with 2 additions and 2 deletions
|
@ -1131,7 +1131,7 @@ export const snapToMid = (
|
|||
);
|
||||
} else if (
|
||||
element.type === "diamond"
|
||||
? nonRotated[0] >= x + width * (element.roundness ? 0.035 : 1)
|
||||
? nonRotated[0] >= x + width * (element.roundness ? 1 - 0.035 : 1)
|
||||
: nonRotated[0] >= x + width / 2 &&
|
||||
nonRotated[1] > center[1] - verticalThrehsold &&
|
||||
nonRotated[1] < center[1] + verticalThrehsold
|
||||
|
@ -1144,7 +1144,7 @@ export const snapToMid = (
|
|||
);
|
||||
} else if (
|
||||
element.type === "diamond"
|
||||
? nonRotated[1] >= y - height * (element.roundness ? 0.035 : 1)
|
||||
? nonRotated[1] >= y + height * (element.roundness ? 1 - 0.035 : 1)
|
||||
: nonRotated[1] >= y + height / 2 &&
|
||||
nonRotated[0] > center[0] - horizontalThrehsold &&
|
||||
nonRotated[0] < center[0] + horizontalThrehsold
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue