Interface ComponentBuilder

interface ComponentBuilder {
    autocorrectShape?: (() => Promise<null | AbstractComponent>);
    addPoint(point): void;
    build(): AbstractComponent;
    getBBox(): Rect2;
    preview(renderer): 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.

Type declaration

    • (): 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.

      Returns Promise<null | AbstractComponent>

Methods

Generated using TypeDoc

OpenSource licenses