API Docs for: 7.2
Show:

MQA.Control Class

Module: MQA

Control is an abstract base class containing functionality specific to all controls.

Constructor

MQA.Control

()

Properties

controlVersion

String

The version of the control.

Methods

getHeight

() Number

Determines the height of the control by selecting the greatest height from all elements in the control subtree. Override this method to provide a custom height (in most cases this should be overridden).

Returns <Number>

The height of the control.

getHeightInternal

() private

Get the height of the control.

getMsg

(
  • key
  • defaultMsg
)
String

Provides localization support for controls with text labels.

Parameters:

  • key String

    The unique key for the message.

  • defaultMsg String

    The default message to use if the message isn't found for the localization.

Returns <String>

The localized message.

getPosition

() MQA.CornerPlacement

Returns the position of the control. A default position is set when instantiated.

Returns <MQA.CornerPlacement>

The position of the control.

getWidth

() Number

Determines the width of the control by selecting the greatest width from all elements in the the control subtree. Override this method to provide a custom width (in most cases this should be overridden).

Returns <Number>

The width of the control.

getWidthInternal

(
  • parent
)
Number private

Get the width of the control.

Parameters:

Returns <Number>

width

initialize

(
  • map
)

Initialize a control on the map.

Parameters: