DrawKeyCommand
What a key press asks of the draw tool. nudge is in screen pixels with y
pointing down, which the caller turns into a position with the map.
placeAtCentre adds a point, or moves the selected vertex, to the map
centre, which the caller also resolves.
This is a type alias exported by @mapcairn/core, checked against version 0.2.0.
Signature
import type { DrawKeyCommand } from "@mapcairn/core";
type DrawKeyCommand = {
readonly type: "dispatch";
readonly action: DrawAction;
} | {
readonly type: "nudge";
readonly dx: number;
readonly dy: number;
} | {
readonly type: "placeAtCentre";
};