RedlineItem

class Communicator.Markup.Redline.RedlineItem()

Base class for Redline Markup. It should not be used directly.

Constructors

constructor()

Properties

_viewer

Methods

draw()

forJson()

getClassName()

hit()

hitWithTolerance()

onDeselect()

onDragEnd()

onDragMove()

onDragStart()

onSelect()

remove()

toJson()


Constructors

constructor

Communicator.Markup.Redline.RedlineItem.constructor(viewer)
Arguments
  • viewer (Communicator.WebViewer()) –

Return type

Communicator.Markup.Redline.RedlineItem

Properties

Communicator.Markup.Redline.RedlineItem._viewer

Methods

draw

Communicator.Markup.Redline.RedlineItem.draw()

Called when the markup item should be redrawn on the screen. This most typically happens when the scene is rendered.

Return type

void

forJson

Communicator.Markup.Redline.RedlineItem.forJson()

Note

forJson is deprecated: Use toJson instead.

Return type

Object

getClassName

Communicator.Markup.Redline.RedlineItem.getClassName()

Gets the fully qualified class name for this markup item. E.g. “Communicator.Markup.Redline.RedlineCircle”

Return type

string

Returns

fully qualified class name

hit

Communicator.Markup.Redline.RedlineItem.hit(point)

Called when a hit test is performed on this markup item.

Arguments
  • point (Communicator.Point2()) – position in window where the hit test is being performed.

Return type

boolean

Returns

boolean value indicating whether this item was picked

hitWithTolerance

Communicator.Markup.Redline.RedlineItem.hitWithTolerance(point, pickTolerance)

Called when a hit test is performed on this markup item.

Arguments
  • point (Communicator.Point2()) – position in window where the hit test is being performed.

  • pickTolerance (number()) – amount of tolerance allowed for a hit in pixels.

Return type

boolean

Returns

boolean value indicating whether this item was picked

onDeselect

Communicator.Markup.Redline.RedlineItem.onDeselect()

Called when this markup item is deselected by the system

Return type

void

onDragEnd

Communicator.Markup.Redline.RedlineItem.onDragEnd(position)
Arguments
  • position (Communicator.Point2()) –

Return type

boolean

onDragMove

Communicator.Markup.Redline.RedlineItem.onDragMove(position)
Arguments
  • position (Communicator.Point2()) –

Return type

boolean

onDragStart

Communicator.Markup.Redline.RedlineItem.onDragStart(position)
Arguments
  • position (Communicator.Point2()) –

Return type

boolean

onSelect

Communicator.Markup.Redline.RedlineItem.onSelect()

Called when this markup item is selected by the system.

Return type

void

remove

Communicator.Markup.Redline.RedlineItem.remove()
Return type

void

toJson

Communicator.Markup.Redline.RedlineItem.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.