Constructor
new TextBoxMarkupItem(textBoxManager, firstPoint, config)
Creates a new TextBoxManager object
Parameters:
Name | Type | Description |
---|---|---|
textBoxManager |
TextBoxManager | The manager that will own this markup item |
firstPoint |
Point3 | The position of insertion point on the model |
config |
Object | Text Box Configuration:
secondPoint - The position of the textbox in relation to the insertion point |
Classes
Methods
(static) fromJson(textBoxManager, json) → {TextBoxMarkupItem}
Creates a markup item from a previously serialized JSON object
Parameters:
Name | Type | Description |
---|---|---|
textBoxManager |
TextBoxManager | The manager that will own this markup item |
json |
json | The JSON object to deserialize |
Returns:
Markup Item
- Type
- TextBoxMarkupItem
deselect()
Deselects the markup
destroy()
Deletes the markup
getAllowEditing() → {boolean}
Retrieves the markup's allow editing state
Returns:
- True if text editing is allowed, false otherwise
- Type
- boolean
getAllowFirstPointMove() → {boolean}
Returns true if first point can be moved
Returns:
- True if first point can be moved, false otherwise
- Type
- boolean
getAllowSecondPointMove() → {boolean}
Returns true if second point can be moved
Returns:
- True if second point can be moved, false otherwise
- Type
- boolean
getCheckVisibility() → {boolean}
Retrieves the markup's check visibility state
Returns:
- True if the markup will be hidden if the insertion point is not visible, false otherwise
- Type
- boolean
getExtraDiv() → {object}
Returns the markups extra div (if any)
Returns:
- The extra div
- Type
- object
getFirstPoint() → {Point3}
Retrieves the position of the insertion point
Returns:
Insertion point
- Type
- Point3
getFixed() → {boolean}
Returns the markups fixed state
Returns:
- True if the markup is fixed, false otherwise
- Type
- boolean
getHidden() → {boolean}
Retrieves the markup's hidden state
Returns:
- True if the markup is hidden, false otherwise
- Type
- boolean
getSecondPoint() → {Point3}
Retrieves the position of the text box
Returns:
Text Box Position
- Type
- Point3
getSelected() → {boolean}
Retrieves the markup's selected state
Returns:
- True if the markup is selected, false otherwise
- Type
- boolean
getUniqueId() → {guid}
Retrieves the markup's unique id
Returns:
- The markup's unique id
- Type
- guid
getUserData() → {json}
Retrieves the markup's user data
Returns:
- The markup's user data
- Type
- json
hide()
Hides the markup (if visible)
isPinGeometry(nodeid) → {boolean}
Determines if the provided nodeid is part of the note-pin geometry
Parameters:
Name | Type | Description |
---|---|---|
nodeid |
nodeid | Node Id |
Returns:
- True if the nodeid is part of the note-pin geometry, false otherwise
- Type
- boolean
select()
Selects the markup
setAllowEditing(allow)
Sets if text editing is allowed
Parameters:
Name | Type | Description |
---|---|---|
allow |
boolean | True if text editing is allowed, false otherwise |
setBackgroundColor(color)
Sets the markup's background color
Parameters:
Name | Type | Description |
---|---|---|
color |
Color | The color to set |
setCheckVisibility(check)
Sets if the markup should be hidden if the insertion point is not visible
Parameters:
Name | Type | Description |
---|---|---|
check |
boolean | True if the markup should be hidden if the insertion point is not visible |
setCircleColor(color)
Sets the markup's circle color
Parameters:
Name | Type | Description |
---|---|---|
color |
Color | The color to set |
setFirstPoint(point)
Sets the position of insertion point on the model
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3 | The position of the insertion point |
setFixed(fixed)
Sets the markup's fixed state
Parameters:
Name | Type | Description |
---|---|---|
fixed |
boolean | True if the markup is fixed, false otherwise |
setSecondPoint(point)
Sets the position of the textbox in relation to the insertion point
Parameters:
Name | Type | Description |
---|---|---|
point |
Point3 | The position of the textbox |
setText(text)
Sets the markup's text
Parameters:
Name | Type | Description |
---|---|---|
text |
text | The text to set |
show()
Shows the markup (if hidden)
toJson() → {json}
Returns a json representation of the markup
Returns:
- The json representation of the markup
- Type
- json