Constructor
new AnnotationToolset(paperScope, toolNamesopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
paperScope |
paper.PaperScope | The Paper.js scope. | |
toolNames |
Array.<string> |
<optional> |
Array of tool names to create. If omitted, all tools are created. 'default' is always included. |
- Source:
Members
onModeChanged :function|null
Called when mode changes: (mode) => void
Type:
- function | null
- Source:
Methods
destroy()
Remove project listeners. Call when toolset is no longer needed.
- Source:
getTool(name) → {ToolBase|null}
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Tool name (e.g. 'ruler', 'default'). |
- Source:
Returns:
- Type
- ToolBase | null
setMode()
Compute current mode from selection and optionally deactivate active tool if not enabled for that mode.
Notifies via onModeChanged so toolbar can update buttons.
- Source: