RedlineItem

class Communicator.Markup.Redline.RedlineItem()

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

Constructors

Properties


Constructors

RedlineItem.constructor(viewer)
Arguments
Return type

RedlineItem

Properties

RedlineItem._viewer
Type

WebViewer

Methods

draw

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

RedlineItem.forJson()
Deprecated

Use toJson instead.

Return type

Object

getClassName

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

RedlineItem.hit(point)

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

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

Return type

boolean

Returns

boolean value indicating whether this item was picked

hitWithTolerance

RedlineItem.hitWithTolerance(point, pickTolerance)

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

Arguments
  • point (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

RedlineItem.onDeselect()

Called when this markup item is deselected by the system

Return type

void

onDragEnd

RedlineItem.onDragEnd(position)
Arguments
Return type

boolean

onDragMove

RedlineItem.onDragMove(position)
Arguments
Return type

boolean

onDragStart

RedlineItem.onDragStart(position)
Arguments
Return type

boolean

onSelect

RedlineItem.onSelect()

Called when this markup item is selected by the system.

Return type

void

remove

RedlineItem.remove()
Return type

void

toJson

RedlineItem.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.