registerFigure(figure)
registerFigure used to custom figure.
Reference
typescript
(
overlay: {
name: string
draw: (ctx: CanvasRenderingContext2D, attrs: any, styles: object) => void
checkEventOn: (coordinate: Coordinate, attrs: any, styles: object) => boolean
}
) => voidParameters
figureFigure configuration.nameName, unique identifier.drawDrawing method.checkEventOnChecks if the event is on a figure.
Returns
registerFigure returns undefined 。