UNPKG

tldraw

Version:

A tiny little drawing editor.

16 lines (11 loc) 379 B
import { StateNode, TLPointerEventInfo } from '@tldraw/editor' export class Idle extends StateNode { static override id = 'idle' info = {} as TLPointerEventInfo & { onInteractionEnd?: string } override onEnter(info: TLPointerEventInfo & { onInteractionEnd: string }) { this.info = info } override onPointerDown() { this.parent.transition('pointing', this.info) } }