LineManager

class Communicator.LineManager()

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


Methods

addLine

Communicator.LineManager.addLine(lineItem)

Adds a new Line to the Line Manager

Arguments
  • lineItem (Communicator.Markup.Line.LineMarkup()) – LineMarkup Object that will be added

Return type

Promise[void]

exportMarkup

Communicator.LineManager.exportMarkup()
Return type

[Object]

Returns

JSON Array with line markup

getAllLines

Communicator.LineManager.getAllLines()

Return an array of line items.

Return type

[Communicator.Markup.Line.LineMarkup]

Returns

array of all line items.

getLineByNodeId

Communicator.LineManager.getLineByNodeId(id)

Gets a line markup item associated with a node id.

Arguments
  • id (number()) –

Return type

{  }

loadData

Communicator.LineManager.loadData(lineDataJson)

Loads JSON markup data

Arguments
  • lineDataJson ([any]()) –

Return type

Promise[[boolean]]

removeAllLines

Communicator.LineManager.removeAllLines()

Removes all line items.

Return type

Promise[void]

removeLastLine

Communicator.LineManager.removeLastLine()

Removes the most recently added line item.

Return type

Promise[void]

removeLine

Communicator.LineManager.removeLine(lineItem)

Removes an existing line item.

Arguments
  • lineItem (Communicator.Markup.Line.LineMarkup()) – the line item to remove.

Return type

Promise[void]