control.RulerControl
Extends control.Button.
The "Ruler" control. The key of the control in the storage. control.storage — "rulerControl".
Constructor | Fields | Events | Methods
Constructor
control.RulerControl([parameters])
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object Control parameters. |
|
— |
Type: Object Object describing the data of a control. |
|
— |
Type: Object Control options. |
|
false |
Type: Boolean Whether the control registers its size in the map margins manager map.margin.Manager. |
|
— |
Type: Object Object describing the position of a control. If the position option is set, the float option value is automatically treated as "none". |
|
30 |
Type: Number|String Position relative to the bottom edge of the map. |
|
'auto' |
Type: Number|String Position relative to the left edge of the map. |
|
10 |
Type: Number|String Position relative to the right edge of the map. |
|
'auto' |
Type: Number|String Position relative to the top edge of the map. |
|
true |
Type: Boolean Flags if the ruler control should be displayed to the right of the ruler button. |
|
true |
Type: Boolean Indicates if the control is displayed. |
|
— |
Type: Object Object describing the state of a control. |
Fields
Name |
Type |
Description |
Button data. Names of fields that are available via the data.Manager.get method:
Inherited from control.Button. |
||
Event manager. Inherited from IEventEmitter. |
||
Options manager. Inherited from IControl. |
||
The event indicating that the button has been pressed. Unlike the click event, it is generated only if the state isEnabled == true. Instance of the Event class. Inherited from control.Button. |
||
Button state. Names of fields that are available via the data.Manager.get method:
Inherited from control.Button. |
Events
Name |
Description |
Clicking the button. Instance of the Event class. Inherited from control.Button. |
|
The control is not selected. Inherited from ISelectableControl. |
|
The control is unavailable. Inherited from ISelectableControl. |
|
The control is available. Inherited from ISelectableControl. |
|
Change to the object options. Inherited from ICustomizable. |
|
The parent object reference changed. Data fields:
Inherited from IChild. |
|
The control is selected. Inherited from ISelectableControl. |
Methods
Name |
Returns |
Description |
deselect() |
Cancels selection of the control (turns it off). Inherited from ISelectableControl. |
|
disable() |
Makes the control unavailable (user actions are not allowed). Inherited from ISelectableControl. |
|
enable() |
Makes the control available (user actions are allowed). Inherited from ISelectableControl. |
|
getMap() |
Returns reference to the map. Inherited from control.Button. |
|
IControlParent|null |
Returns link to the parent object, or null if the parent element was not set. Inherited from IControl. |
|
Boolean |
Returns true if the control is available, or false if it is unavailable. Inherited from ISelectableControl. |
|
Boolean |
Returns true if the control is selected, or false if it is not selected. Inherited from ISelectableControl. |
|
select() |
Selects (turns on) the control. Inherited from ISelectableControl. |
|
Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object. Inherited from IControl. |