Class: WandToolbar

OSDPaperjsAnnotation.WandTool.WandToolbar(wandTool)

The `WandToolbar` class represents the user interface toolbar for the `WandTool` class. This toolbar provides a range of options and controls that users can interact with to configure the behavior of the magic wand tool. It extends the `AnnotationUIToolbarBase` class to create a cohesive interface for the tool. The `WandToolbar` offers features for setting threshold, selection modes, and applying changes, making the magic wand tool a versatile and interactive selection tool.

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: