DrawEvent
What the last action did, for the interface to announce. Every action that changes the state or is refused replaces it with a new object.
This is a type alias exported by @mapcairn/core, checked against version 0.2.0.
Signature
import type { DrawEvent } from "@mapcairn/core";
type DrawEvent = {
readonly type: "mode";
readonly kind: DrawKind;
} | {
readonly type: "vertex-added";
readonly shapeId: string;
readonly count: number;
} | {
readonly type: "vertex-moved";
readonly shapeId: string;
readonly index: number;
} | {
readonly type: "vertex-inserted";
readonly shapeId: string;
readonly index: number;
readonly count: number;
} | {
readonly type: "vertex-removed";
readonly shapeId: string;
readonly count: number;
} | {
readonly type: "finished";
readonly shapeId: string;
} | {
readonly type: "discarded";
readonly kind: DrawKind;
} | {
readonly type: "rejected";
readonly issue: DrawIssue;
} | {
readonly type: "deleted";
readonly label: string;
} | {
readonly type: "cleared";
readonly count: number;
} | {
readonly type: "selected";
readonly shapeId: string;
readonly vertex: number | null;
} | {
readonly type: "undone";
} | {
readonly type: "redone";
} | {
readonly type: "loaded";
readonly count: number;
} | {
readonly type: "imported";
};