Interface ComponentBuilder

interface ComponentBuilder {
    autocorrectShape?: (() => Promise<null | AbstractComponent>);
    addPoint(point: StrokeDataPoint): void;
    build(): AbstractComponent;
    getBBox(): Rect2;
    preview(renderer: AbstractRenderer): void;
}

Properties

autocorrectShape?: (() => Promise<null | AbstractComponent>)

Called when the pen is stationary (or the user otherwise activates autocomplete). This might attempt to fit the user's drawing to a particular shape.

The shape returned by this function may be ignored if it has an empty bounding box.

Although this returns a Promise, it should return as fast as possible.

Methods

OpenSource licenses