MarkupManager

class Communicator.MarkupManager()

This class provides an interface into working with markup in the viewer. More information can be found here.


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 the MarkupView object to activate

  • duration ({  }()) – 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 name

  • triggerEvent ({  }()) – optional parameter indicating whether a CallbackMap.viewCreated event should be triggered. This parameter defaults to true

  • visibilityState ({  }()) – optional parameter

  • colorMap ({  }()) –

  • 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
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
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 ({  }()) – The MarkupItem 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

unregisterMarkup

Communicator.MarkupManager.unregisterMarkup(uniqueId)

Unregisters a MarkupItem It will no longer be rendered with the 3D view.

Arguments
  • uniqueId (Communicator.Uuid()) – unique handle to the object that was returned from registerMarkup

Return type

void

updateLater

Communicator.MarkupManager.updateLater()
Return type

void