protected lookup(port: IPort, type: Constructor<any>): any {
if (type === IShapeGeometry) {
const bounds = this.getPortBounds(port)
const PortShapeGeometry = class extends BaseClass(IShapeGeometry) {
getIntersection(inner: Point, outer: Point): Point | null {
return GeometryUtilities.findEllipseLineIntersection(
bounds,
inner,
outer
)
}
getOutline(): GeneralPath | null {
const path = new GeneralPath()
path.appendEllipse(bounds, false)
return path
}
isInside(location: Point): boolean {
return GeometryUtilities.ellipseContains(bounds, location, 0)
}
}
return new PortShapeGeometry()
}