Class: SpotTag
component.SpotTag
classdesc
Tag holding properties for visualizing the centroid of a geometry.
example
var geometry = new PointGeometry([0.3, 0.3]);var tag = new SpotTag( "id-1", geometry { editable: true, color: 0xff0000 });
tagComponent.add([tag]);
#
Hierarchy↳
SpotTag
#
Constructors#
constructor• new SpotTag(id
, geometry
, options?
)
Create a spot tag.
override
#
ParametersName | Type | Description |
---|---|---|
id | string | |
geometry | Geometry | |
options? | SpotTagOptions | Options defining the visual appearance and behavior of the spot tag. |
#
Overrides#
Defined incomponent/tag/tag/SpotTag.ts:40
#
Events#
on• on(type
, handler
): void
Event fired when the geometry of the tag has changed.
example
var tag = new OutlineTag({ // tag options });// Set an event listenertag.on('geometry', function() { console.log("A geometry event has occurred.");});
#
ParametersName | Type |
---|---|
type | "geometry" |
handler | (event : TagStateEvent ) => void |
#
Returnsvoid
#
Inherited from#
Defined in• on(type
, handler
): void
Event fired when a tag has been updated.
example
var tag = new OutlineTag({ // tag options });// Set an event listenertag.on('tag', function() { console.log("A tag event has occurred.");});
#
ParametersName | Type |
---|---|
type | "tag" |
handler | (event : TagStateEvent ) => void |
#
Returnsvoid
#
Inherited from#
Defined in#
Accessors#
color• get
color(): number
Get color property.
#
Returnsnumber
The color of the spot as a hexagonal number;
#
Defined incomponent/tag/tag/SpotTag.ts:56
• set
color(value
): void
Set color property.
fires
changed
#
ParametersName | Type |
---|---|
value | number |
#
Returnsvoid
The color of the spot as a hexagonal number;
#
Defined incomponent/tag/tag/SpotTag.ts:66
#
editable• get
editable(): boolean
Get editable property.
#
Returnsboolean
Value indicating if tag is editable.
#
Defined incomponent/tag/tag/SpotTag.ts:75
• set
editable(value
): void
Set editable property.
fires
changed
#
ParametersName | Type |
---|---|
value | boolean |
#
Returnsvoid
Value indicating if tag is editable.
#
Defined incomponent/tag/tag/SpotTag.ts:85
#
geometry• get
geometry(): Geometry
Get geometry property.
#
ReturnsThe geometry of the tag.
#
Defined in#
icon• get
icon(): string
Get icon property.
#
Returnsstring
#
Defined incomponent/tag/tag/SpotTag.ts:94
• set
icon(value
): void
Set icon property.
fires
changed
#
ParametersName | Type |
---|---|
value | string |
#
Returnsvoid
#
Defined incomponent/tag/tag/SpotTag.ts:104
#
id• get
id(): string
Get id property.
#
Returnsstring
#
Defined in#
text• get
text(): string
Get text property.
#
Returnsstring
#
Defined incomponent/tag/tag/SpotTag.ts:113
• set
text(value
): void
Set text property.
fires
changed
#
ParametersName | Type |
---|---|
value | string |
#
Returnsvoid
#
Defined incomponent/tag/tag/SpotTag.ts:123
#
textColor• get
textColor(): number
Get text color property.
#
Returnsnumber
#
Defined incomponent/tag/tag/SpotTag.ts:132
• set
textColor(value
): void
Set text color property.
fires
changed
#
ParametersName | Type |
---|---|
value | number |
#
Returnsvoid
#
Defined incomponent/tag/tag/SpotTag.ts:142
#
Methods#
fireâ–¸ fire(type
, event
): void
#
ParametersName | Type |
---|---|
type | "tag" | "geometry" |
event | TagStateEvent |
#
Returnsvoid
#
Inherited from#
Defined in../doc/component/tag/tag/Tag.ts:103
#
offâ–¸ off(type
, handler
): void
Unsubscribe from an event by its name.
#
ParametersName | Type |
---|---|
type | "tag" | "geometry" |
handler | (event : TagStateEvent ) => void |
#
Returnsvoid
#
Inherited from#
Defined in../doc/component/tag/tag/Tag.ts:118
#
setOptionsâ–¸ setOptions(options
): void
Set options for tag.
description
Sets all the option properties provided and keps
the rest of the values as is.
fires
changed
#
ParametersName | Type | Description |
---|---|---|
options | SpotTagOptions | Spot tag options |
#
Returnsvoid