Class: FeatureUI

OSDPaperjsAnnotation.FeatureUI(paperItem, optsopt)

A user interface for managing features.

Constructor

new FeatureUI(paperItem, optsopt)

Create a new FeatureUI instance.
Parameters:
Name Type Attributes Description
paperItem paper.Item The paper item object.
opts object <optional>
The initialization options.
Properties
Name Type Attributes Description
iconFactory IconFactory <optional>
the IconFactory to use
Source:

Methods

centerItem(immediatelyopt)

Center the feature in the viewport.
Parameters:
Name Type Attributes Default Description
immediately boolean <optional>
false Whether to center the feature immediately or not.
Source:

openStyleEditor()

Open the style editor for the feature.
Source:

remove()

Remove the UI element associated with the feature.
Source:

removeItem()

Remove the paper item associated with the feature.
Source:

setLabel(text, source) → {string}

Set the label of the feature with a source.
Parameters:
Name Type Description
text string The new label of the feature.
source string The source of the label (e.g. 'user-defined' or 'initializing').
Source:
Returns:
The new label of the feature.
Type
string

updateLabel()

Update the label of the feature in the UI element.
Source:

useAsBoundingElement(toggleopt) → {boolean}

Use the feature as a bounding element.
Parameters:
Name Type Attributes Default Description
toggle boolean <optional>
false Whether to toggle the bounding element status or not.
Source:
Returns:
Whether the feature is used as a bounding element or not.
Type
boolean