Fastboard API

Updated

The API reference guide for the Fastboard SDK.

This page provides the API reference for the Fastboard SDK.

Understand the tech

This section provides the API reference for the Fastboard SDK on Web.

Reference

createFastboard

createFastboard(options: FastboardOptions): Promise;

createUI

createUI(app?: FastboardApp | null, div?: Element): UI;

createReplayUI

createReplayUI(player?: FastboardPlayer | null, div?: Element): ReplayUI;

canOperate

get canOperate(): boolean

mount

mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps): {
 update(props?: MountProps | undefined): void;
 destroy(): void;
};

dispatchDocsEvent

export function dispatchDocsEvent(
  fastboard: FastboardApp | WindowManager,
  event: "prevPage" | "nextPage" | "prevStep" | "nextStep" | "jumpToPage",
  options: DocsEventOptions = {}
)

FastboardApp class

undo

undo(): void

redo

redo(): void

moveCamera

moveCamera(camera: Partial<Camera>): void

moveCameraToContain

moveCameraToContain(rect: Rectangle): void;

setAppliance

setAppliance(appliance: ApplianceNames, shape?: ShapeType): void;

setStrokeWidth

setStrokeWidth(strokeWidth: number): void

setStrokeColor

setStrokeColor(strokeColor: Color): void

setTextColor

setTextColor(textColor: Color): void

setTextSize

setTextSize(textSize: number): void

insertImage

async insertImage(url: string, crossOrigin?: boolean | string)

insertMedia

insertMedia(title: string, src: string): Promise<string | undefined>

insertDocs [1/2]

insertDocs(title: string, response: ProjectorResponse): Promise<string | undefined>;

insertDocs [2/2]

insertDocs(params: InsertDocsParams): Promise<string | undefined>;

removePage

removePage(index?): Promise<boolean>

jumpPage

jumpPage(index: number)