API Docs for: 7.2
Show:

MQA.DisplayState Class

Module: MQA

Represents a unique display state for a POI. A display state manages the content elements (the icon and shadow) for a POI.

Constructor

MQA.DisplayState

(
  • stateName
  • setupDefault
)
private

Parameters:

Methods

activate

()

applyIcon

()

applyShadow

(
  • justOffset
)

Parameters:

deactivate

()

getBoudns

(
  • anchorX
  • anchorY
)

Get the bounds of the various display objects as well as the overall bounds relative to some anchor point (ie. this will usually be the display coordinates of the actual POI anchor so that the resultant bounds object will be in display coordinate space.

Parameters:

  • anchorX Integer
  • anchorY Integer

getCursor

()

getIcon

()

getIconOffset

() MQA.Point

Get the set icon offset or the calculated default.

Returns <MQA.Point>

the x/y offset

getShadow

()

getShadowOffset

()

isValid

() Boolean

Returns <Boolean>

setCursor

()

setIcon

()

setIconOffset

(
  • the
)

Set the icon's offset

Parameters:

  • the MQA.Point

    x/y offset from the top/left of the Icon

setShadow

()

setShadowOffset

(
  • offset
)

Parameters:

shadowAnchor

() Object

Returns the natural shadow anchor from which shadow offsets are computed. This is setup such that the shadow offset is the offset from the lower-left corner of the icon as if the shadow were stacked as a block element just below the icon.

Returns <Object>

x:x,y:y