mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Small diamond distance fix
This commit is contained in:
parent
6e67aa3a3c
commit
1d293b9203
1 changed files with 8 additions and 10 deletions
|
@ -131,16 +131,14 @@ const createDiamondSide = (
|
|||
startRadius: number,
|
||||
endRadius: number,
|
||||
): Segment<GlobalPoint> => {
|
||||
const a = ellipseSegmentInterceptPoints(
|
||||
ellipse(s[0], startRadius, startRadius),
|
||||
s,
|
||||
)[0];
|
||||
const b = ellipseSegmentInterceptPoints(
|
||||
ellipse(s[1], endRadius, endRadius),
|
||||
s,
|
||||
)[0];
|
||||
|
||||
return segment(a, b);
|
||||
return segment(
|
||||
ellipseSegmentInterceptPoints(
|
||||
ellipse(s[0], startRadius, startRadius),
|
||||
s,
|
||||
)[0] ?? s[0],
|
||||
ellipseSegmentInterceptPoints(ellipse(s[1], endRadius, endRadius), s)[0] ??
|
||||
s[1],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue