LineManager

class Communicator.LineManager()

This class provides an interface to 3D line management related functions of the viewer.


Methods

addLine

LineManager.addLine(lineItem)

Adds a new Line to the Line Manager

Arguments
  • lineItem (LineMarkup()) – LineMarkup Object that will be added

Return type

Promise <void>

exportMarkup

LineManager.exportMarkup()
Return type

[Object]

Returns

JSON Array with line markup

getAllLines

LineManager.getAllLines()

Return an array of line items.

Return type

[LineMarkup()]

Returns

array of all line items.

getLineByNodeId

LineManager.getLineByNodeId(id)

Gets a line markup item associated with a node id.

Arguments
  • id (number()) –

Return type

LineMarkup() | null

loadData

LineManager.loadData(lineDataJson)

Loads JSON markup data

Arguments
  • lineDataJson ([any]()) –

Return type

Promise <[boolean]>

removeAllLines

LineManager.removeAllLines()

Removes all line items.

Return type

Promise <void>

removeLastLine

LineManager.removeLastLine()

Removes the most recently added line item.

Return type

Promise <void>

removeLine

LineManager.removeLine(lineItem)

Removes an existing line item.

Arguments
Return type

Promise <void>