mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Need all intersection points for curved corners
This commit is contained in:
parent
e459ea0cc7
commit
e1812c4c91
1 changed files with 6 additions and 15 deletions
|
@ -157,22 +157,13 @@ export function curveIntersectLineSegment<
|
||||||
return bezierEquation(c, t);
|
return bezierEquation(c, t);
|
||||||
};
|
};
|
||||||
|
|
||||||
let solution = calculate(initial_guesses[0]);
|
const solutions = [
|
||||||
if (solution) {
|
calculate(initial_guesses[0]),
|
||||||
return [solution];
|
calculate(initial_guesses[1]),
|
||||||
}
|
calculate(initial_guesses[2]),
|
||||||
|
].filter((x, i, a): x is Point => x !== null && a.indexOf(x) === i);
|
||||||
|
|
||||||
solution = calculate(initial_guesses[1]);
|
return solutions;
|
||||||
if (solution) {
|
|
||||||
return [solution];
|
|
||||||
}
|
|
||||||
|
|
||||||
solution = calculate(initial_guesses[2]);
|
|
||||||
if (solution) {
|
|
||||||
return [solution];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue