@mocanvas/editor · type
type UiEvent = {
/** The action, e.g. `"select-tool"`, `"zoom-in"`, `"delete-shapes"`. */
name: string;
/** Where it came from, plus whatever the emitting call site attached. */
data: {
source: string;
} & Record<string, unknown>;
}What a host's analytics hook receives.
onUiEvent exists so an app can record what people do with the canvas. The
editor sends this nowhere on its own — it calls the host's function and
forgets it.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.