Communicator.Markup.MarkupItem

 MarkupItem

This is a base class for all markup items that are overlayed over the viewer. Inherit from this class or provide an identical interface when creating custom markup items.

Methods

draw

  • draw(): void
  • Called when the markup item should be redrawn on the screen. This most typically happens when the scene is rendered.

    Returns void

forJson    [deprecated]

  • forJson(): Object
  • deprecated

    Use toJson instead.

    Returns Object

getClassName

  • getClassName(): string
  • Gets the fully qualified class name for this markup item. E.g. "Communicator.Markup.Redline.RedlineCircle"

    Returns string

    fully qualified class name

hit

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

    Parameters

    • point: Point2

      position in window where the hit test is being performed.

    Returns boolean

    boolean value indicating whether this item was picked

hitWithTolerance

  • hitWithTolerance(point: Point2, pickTolerance: number): boolean
  • Called when a hit test is performed on this markup item.

    Parameters

    • point: Point2

      position in window where the hit test is being performed.

    • pickTolerance: number

      amount of tolerance allowed for a hit in pixels.

    Returns boolean

    boolean value indicating whether this item was picked

onDeselect

  • onDeselect(): void
  • Called when this markup item is deselected by the system

    Returns void

onSelect

  • onSelect(): void
  • Called when this markup item is selected by the system.

    Returns void

remove

  • remove(): void
  • Called when the MarkupItem is removed from the system. Any cleanup that needs to be done should be performed in this method.

    Returns void

toJson

  • toJson(): Object
  • Creates an object ready for JSON serialization.

    Returns Object

    The prepared object.