Skip to main content
Define a ToolDefinition (engine) and TsdrawCustomTool (UI):

StateNode Interface

Implement these methods to handle events:
  • onEnter / onExit
  • onPointerDown / onPointerMove / onPointerUp
  • onKeyDown / onKeyUp
Transition via info.context.transition(stateId).

Style Panels

Enable styles for your tool:
Available: 'colors', 'dashes', 'fills', 'sizes'.