MarkupManager
- class Communicator.MarkupManager()
This class provides an interface into working with markup in the viewer. More information can be found here.
Methods
Methods
activateMarkupView
- Communicator.MarkupManager.activateMarkupView(uniqueId, duration)
Note
activateMarkupView is deprecated: Use
activateMarkupViewWithPromise
instead.- Arguments
uniqueId (
Communicator.Uuid()
) –duration (
{ }()
) –
- Return type
boolean
activateMarkupViewWithPromise
- Communicator.MarkupManager.activateMarkupViewWithPromise(uniqueId, duration)
Activates a
MarkupView
- Arguments
uniqueId (
Communicator.Uuid()
) – the handle for theMarkupView
object to activateduration (
{ }()
) – the time in milliseconds for the transition to this view
- Return type
Promise[boolean]
addMarkupElement
- Communicator.MarkupManager.addMarkupElement(element)
Add an HTML element to the markup element layer. The element will have its ID set to a system generated unique identifier.
- Arguments
element (
HTMLElement()
) – the HTML Element to add
- Return type
Communicator.Uuid
- Returns
system generated unique identifier which is the id of the passed in object
createMarkupView
- Communicator.MarkupManager.createMarkupView(name, triggerEvent, visibilityState, colorMap, snapshotImage)
Creates a new view based on the current camera, line, and face visibility values.
- Arguments
name (
{ }()
) – optional name for the view. If omitted or null, the system will generate a default nametriggerEvent (
{ }()
) – optional parameter indicating whether aCallbackMap.viewCreated
event should be triggered. This parameter defaults to truevisibilityState (
{ }()
) – optional parametercolorMap (
{ }()
) –snapshotImage (
{ }()
) –
- Return type
Communicator.Uuid
- Returns
Unique identifier for the new view
deleteMarkupView
- Communicator.MarkupManager.deleteMarkupView(uniqueId)
Deletes a
MarkupView
object.- Arguments
uniqueId (
Communicator.Uuid()
) – the handle for the view object to delete
- Return type
boolean
- Returns
true if a
MarkupView
with the supplied uniqueId was deleted, false otherwise
exportMarkup
- Communicator.MarkupManager.exportMarkup()
export markup from the viewer
- Return type
Communicator.MarkupData
- Returns
Serialized markup objects
getActiveMarkupView
- Communicator.MarkupManager.getActiveMarkupView()
Returns the currently active
MarkupView
- Return type
{ }
- Returns
MarkupView
object for the currently active view, or null if no view is active
getMarkupView
- Communicator.MarkupManager.getMarkupView(uniqueId)
Gets a
MarkupView
object from the viewer.- Arguments
uniqueId (
Communicator.Uuid()
) – the handle for the view object to retreive
- Return type
{ }
- Returns
MarkupView
object for the corresponding ID or null if no view was found
getMarkupViewKeys
- Communicator.MarkupManager.getMarkupViewKeys()
- Return type
[Communicator.Uuid]
- Returns
an array of string keys for all markup views
getPickTolerance
- Communicator.MarkupManager.getPickTolerance()
Gets the pick tolerance in pixels for picking a
MarkupItem
- Return type
number
- Returns
Current tolerance
getRenderer
- Communicator.MarkupManager.getRenderer()
Returns a the interface to the
MarkupRenderer
- Return type
Communicator.Markup.MarkupRenderer
- Returns
MarkupRenderer
interface
getSelectedMarkup
- Communicator.MarkupManager.getSelectedMarkup()
Returns the currently selected
MarkupItem
or null if nothing is currently selected- Return type
{ }
- Returns
selected
MarkupItem
loadMarkupData
- Communicator.MarkupManager.loadMarkupData(json)
Loads markup data into the viewer.
- Arguments
json (
{ }()
) –
- Return type
Promise[boolean]
pickMarkupItem
- Communicator.MarkupManager.pickMarkupItem(point)
Picks a
MarkupItem
Tests scene based and markup attached to the active view (if any)- Arguments
point (
Communicator.Point2()
) – position to pick against
- Return type
{ }
- Returns
MarkupItem
that was selected or null if none was picked
refreshMarkup
- Communicator.MarkupManager.refreshMarkup()
Redraws the markup without rendering the scene. Useful when markup is added or removed but the scene is not affected.
- Return type
void
registerMarkup
- Communicator.MarkupManager.registerMarkup(markupItem)
Registers a
MarkupItem
to be rendered with the 3D view.- Arguments
markupItem (
Communicator.Markup.MarkupItem()
) – the item to register
- Return type
Communicator.Uuid
- Returns
unique handle to this
MarkupItem
registerMarkupTypeManager
- Communicator.MarkupManager.registerMarkupTypeManager(markupType, markupTypeManager)
Registers a MarkupTypeManager to add markup to exported data.
- Arguments
markupType (
string()
) –markupTypeManager (
Communicator.MarkupTypeManager()
) –
- Return type
void
removeMarkupElement
- Communicator.MarkupManager.removeMarkupElement(id)
Removes a markup element from the markup element layer
- Arguments
id (
Communicator.Uuid()
) –
- Return type
void
selectMarkup
- Communicator.MarkupManager.selectMarkup(markupItem)
Selects a
MarkupItem
Pass null to clear the selection.- Arguments
markupItem (
{ }()
) – TheMarkupItem
to select.
- Return type
void
setPickTolerance
- Communicator.MarkupManager.setPickTolerance(tolerance)
Sets the pick tolerance in pixels for picking a
MarkupItem
- Arguments
tolerance (
number()
) – The new tolerance
- Return type
void