Constructor
new WandToolbar(wandTool)
Creates a new instance of the `WandToolbar` class, providing users with various options to configure the magic wand tool.
This constructor initializes UI elements, buttons, and interactive controls within the toolbar.
Parameters:
Name | Type | Description |
---|---|---|
wandTool |
WandTool | The `WandTool` instance associated with this toolbar. |
- Source:
Extends
- AnnotationUIToolbarBase
Methods
cycleFloodMode()
Cycle through the flood modes (flood, everywhere)
- Source:
cycleReduceMode()
Cycle through the reduce modes (add, reduce)
- Source:
cycleReplaceMode()
Cycle through the replace modes (replace, expand)
- Source:
isEnabledForMode(mode) → {boolean}
Check if the toolbar should be enabled for the given mode.
The toolbar is enabled when the mode is 'new' or 'MultiPolygon'.
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | The mode to check. |
- Source:
Returns:
True if the toolbar should be enabled for the given mode; otherwise, false.
- Type
- boolean
setThreshold(thr)
Set the threshold value in the threshold input element.
Parameters:
Name | Type | Description |
---|---|---|
thr |
number | The threshold value to set. |
- Source: