Constructor
new TextBoxManager(viewer, useMarkupManager)
Creates a new TextBoxManager object
Parameters:
Name | Type | Default | Description |
---|---|---|---|
viewer |
WebViewer | Webviewer Object |
|
useMarkupManager |
bool | true | Use markup manager to manage TextBoxMarkups |
Classes
Methods
add(markup)
Adds a new markup to the manager
Parameters:
Name | Type | Description |
---|---|---|
markup |
TextBoxMarkupItem | new TextBoxMarkupItem to add |
delete(uniqueid)
Deletes a markup item from the manager
Parameters:
Name | Type | Description |
---|---|---|
uniqueid |
guid | Id of Markup Element |
exportMarkup() → {json}
Exports all markup elements
Returns:
Array of json objects
- Type
- json
getByID(uniqueid) → {TextBoxMarkupItem}
Retrieves a markup element given its unique id
Parameters:
Name | Type | Description |
---|---|---|
uniqueid |
guid | Id of Markup Element |
Returns:
TextBoxMarkupItem or undefined
- Type
- TextBoxMarkupItem
getMarkupUpdatedCallback() → {callback}
Retrieves the callback that gets triggered when a markup is updated
Returns:
callback
- Type
- callback
getSelected() → {TextBoxMarkupItem}
Retrieves the currently selected markup element
Returns:
TextBoxMarkupItem or undefined
- Type
- TextBoxMarkupItem
loadData(json)
Loads markup elements from a json array
Parameters:
Name | Type | Description |
---|---|---|
json |
json | Array of json objects representing markup |
pickMarkupItem(position) → {TextBoxMarkupItem}
Finds a markup element by a given 2D screenspace position
Parameters:
Name | Type | Description |
---|---|---|
position |
Point2 | 2D screenspace position |
Returns:
TextBoxMarkupItem or null
- Type
- TextBoxMarkupItem
refreshMarkup()
Redraws all markup elements
setMarkupUpdatedCallback(callback)
Sets a callback that gets triggered when a markup is updated
Parameters:
Name | Type | Description |
---|---|---|
callback |
callback | callback function with the markup element as parameter |