LabelTextObject
Extends
LabelObject
Properties
isLabelText
Used to check whether this or derived classes are label texts. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
Type | Read-Only | Defaults | Description |
---|---|---|---|
boolean | YES | True |
Inherited Properties
id
Type | Read-Only | Description |
---|---|---|
number | symbol | null | YES |
isAdsumObject
Used to check whether this or derived classes are Adsum object 3D. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
Type | Read-Only | Defaults | Description |
---|---|---|---|
boolean | YES | True |
isLabel
Used to check whether this or derived classes are labels. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
Type | Read-Only | Defaults | Description |
---|---|---|---|
boolean | YES | True |
levelOfDetails
The level of details associated to that object.
Type | Read-Only | Defaults | Description |
---|---|---|---|
LevelOfDetails | Yes | null |
Methods
getStyle
async getStyle() : Promise< TextStyleOptions, Error>
Returns:
Type: Promise< TextStyleOptions, Error >
getText
async getText() : Promise< string, Error>
Returns:
Type: Promise< string, Error >
setStyle
async setStyle(style: TextStyleOptions|object): Promise<void, Error>
Update the text style. The given style will be merged with the current one, so you can change a single style property at once.
Please note that updating style & text is performance consuming, try to update them in a single call.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
style | TextStyleOptions | object | Yes | - |
Returns:
Type: Promise< void, Error >
setText
async setText(text: string, style: ?TextStyleOptions|object = null ): Promise<void, Error>
Please note that updating style & text is performance consuming, try to update them in a single call.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
text | string | Yes | - | |
style | ?TextStyleOptions | object | No | null | Update the style in the same time (if not null). Check setStyle method for more details |
Returns:
Type: Promise< void, Error >
Overwritten Methods
getType
getType(): ADSUM_OBJECT_TYPES.LabelImageObject
Returns:
Type: ADSUM_OBJECT_TYPES.LabelImageObject
Inherited Methods
getDisplayMode
async getDisplayMode(): Promise<DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT, Error>
Returns:
Type: Promise< DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT, Error >
getName
async getName(): Promise<string, Error>
Returns:
Type: Promise<string, Error>
getOffset
async getOffset(): Promise<{x: number, y: number, z: number},Error>
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
getOrientationMode
async getOrientationMode(): Promise<LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | LABEL_ORIENTATION_MODES.FLIP>
Returns:
Type: Promise<LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | LABEL_ORIENTATION_MODES.FLIP, Error>
getOpacity
async getOpacity(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
getParent
async getParent(): Promise<SiteObject|BuildingObject|FloorObject|SpaceObject, Error>
Returns:
Type: Promise<SiteObject | BuildingObject | FloorObject | SpaceObject, Error>
getPlaceId
async getPlaceId(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
getRotation
async getRotation(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
getScale
async getScale(): Promise<{x: number, y: number, z: number},Error>
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
isAutoScale
async isAutoScale(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
isPermanentDisplay
async isPermanentDisplay(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
isSelected
async isSelected(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
moveBy
async moveBy(x: number, y: number, z: number): LabelObject
Move the label by incrementing the offset position. This method will set the getOffset.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: LabelObject
moveTo
async moveTo(x: number, y: number, z: number): LabelObject
Move the label to the given position. This method will set the getOffset.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: LabelObject
setAutoScale
async setAutoScale(autoScale: boolean): LabelObject
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
autoScale | boolean | Yes | - |
Returns:
Type: LabelObject
setDisplayMode
async setDisplayMode(displayMode: DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
displayMode | DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT | Yes | - |
Returns:
Type: Promise<void, Error>
setOrientationMode
async setOrientationMode(orientationMode: LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
orientationMode | LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | Yes | - |
Returns:
Type: Promise<void, Error>
setOpacity
async setOpacity(opacity: number): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
opacity | number | Yes | - |
Returns:
Type: Promise<void, Error>
setPermanentDisplay
async setPermanentDisplay(permanentDisplay: boolean): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
permanentDisplay | boolean | Yes | - |
Returns:
Type: Promise<void, Error>
setRotation
async setRotation(rotation: number): Promise<void, Error>
Note: rotation is only available when getOrientationMode is LABEL_ORIENTATION_MODES.STATIC
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
rotation | number | Yes | - | The rotation in degrees |
Returns:
Type: Promise<void, Error>
setScale
async setScale(x: number, y: number, z: number): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: Promise<void, Error>
select
async select(): Promise<void, Error>
Mark this label as selected, this will affect the visibility behavior according to isPermanentDisplay
Returns:
Type: Promise<void, Error>
unselect
async unselect(): Promise<void, Error>
Mark this label as unselected, this will affect the visibility behavior according to isPermanentDisplay
Returns:
Type: Promise<void, Error>