Fix bug in ellipse (#292)
This commit is contained in:
parent
e542f1fde5
commit
2f1816404b
1 changed files with 4 additions and 0 deletions
|
@ -262,6 +262,10 @@ export class EllipseUtil extends TDShapeUtil<T, E> {
|
|||
).points.sort((a, b) => Vec.dist(a, point) - Vec.dist(b, point))[0]
|
||||
}
|
||||
|
||||
if (!intersection) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// The anchor is a point between the handle and the intersection
|
||||
const anchor = Vec.med(point, intersection)
|
||||
|
||||
|
|
Loading…
Reference in a new issue