Telogis.GeoBase.Widgets.Dock |
Widgets.Dock inherits from Widgets.MapControl.
A map widget designed to contain others, such as a slider and scale, to neatly dock them against one edge of the map.
Type | Description |
---|---|
Errors.ConfigurationError | If no valid Widgets.DockSkin could be found. |
Name | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Widgets.Dock(config) | Arguments
|
Name | Description |
---|---|
add (Widgets.MapControl control) | Adds a map control to the dock. Controls are spaced evenly along the dock as they are added. Arguments
|
destroy () | Deallocates resources used by the dock and its constituent widgets. This should only be called once the dock is never to be used again. |
getLength () | Finds the length of the Widgets.Dock, which is its width in the direction of its layout. This will be the width of the dock's Widgets.Map in the appropriate direction. ReturnsNumber - The length of the dock, in pixels. |
getSize (Function callback) | Finds the dimensions of the Telogis.GeoBase.MapControl.Dock, in pixels. These are returned asynchronously to a specified callback function. Arguments
|
getThickness () | Finds the thickness of the Widgets.Dock, which is its width in the direction perpendicular to its layout. This will be the thickness of the thickest control contained in the dock. ReturnsNumber - The thickness of the dock, in pixels. |
isVertical () | Tests whether the Widgets.Dock is aligned vertically. If not, it can be assumed to be horizontal. ReturnsBoolean - True if the dock is aligned left or right (vertically); false if it is aligned top or bottom (horizontally). |
setMap (Widgets.Map map) | Changes the map upon which the Widgets.Dock is placed. This is invariably the same map as the one controlled by the map controls contained in the dock, so these controls are also reconfigured to refer to the new map. Arguments
|
update (Number updateType) | Adjusts the locations of the controls and dock elements so that they are evenly positioned and spaced with appropriate stretches of the dock itself. There are three cases for the number of controls in the dock which are handled separately: if there are more than two controls registered, one is placed at each end of the dock and the remaining are distributed evenly between. If there is only one control registered, it is placed in the center of the dock with filler on either side. If no controls have been registered, the entire dock is occupied by filler space. Arguments
|
Name | Type | Description |
---|---|---|
map | Widgets.Map | The map associated with the widgets in the dock, upon which the dock will be placed. |