Telogis.GeoBase.Widgets.ScaleSkin |
Widgets.ScaleSkin inherits from Skin.
A simple class that combines all the information describing the appearance of a map-scale widget, and can be used to theme map-scales reasonably painlessly.
Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Widgets.ScaleSkin(config) | Arguments
|
Name | Description |
---|---|
applyScaleLabelStyle (Element label) | Applies the CSS properties for labels and then, more specifically, a scale-indicator label, to an element in the scale widget. These properties can be specified on construction with the Widgets.ScaleSkin.config.labelStyle and Widgets.ScaleSkin.config.scaleLabelStyle configuration properties. Arguments
|
applyUnitLabelStyle (Element label) | Applies the CSS properties for labels and then, more specifically, a unit-indicator label, to an element in the scale widget. These properties can be specified on construction with the Widgets.ScaleSkin.config.labelStyle and Widgets.ScaleSkin.config.unitLabelStyle configuration properties. Arguments
|
createMark (String id) | Creates an image element and and initializes it so that it can be used as a unit mark on the scale. This involves setting its 'src' attribute to the skin's mark image URL -- additional CSS tweaks are handled by the calling object. Arguments
Element - The new mark element. |
getBarEnd () | Finds the point within the body image that signifies the end of the scale bar. ReturnsPoint - The pixel offset in the body image of the second scale bar end-point. |
getBarLength () | Finds the pixel length of the bar displayed as part of the scale's background image. ReturnsNumber - The length, in pixels, of the bar feature of the body image. |
getBarStart () | Finds the point within the body image that signifies the start of the scale bar. ReturnsPoint - The pixel offset in the body image of the first scale bar end-point. |
getSize () | Finds the dimensions of the scale widget, which are determined by the size of the body image. Should only be called once the skin has loaded. ReturnsSize - The pixel width and height of scales that use this skin. |
initBody (Element elem) | Sets up a given element to act as the body of the scale by sizing it appropriately and setting its background image to be the body image. Should only be called once the skin has loaded. Arguments
|
placeMark (Element elem, Number pos) | Adjust the CSS positioning of a given mark element so that it is displayed a certain number of pixels along the length of the scale bar depicted on the scale's body image. Should only be called once the skin has loaded. Arguments
|
Name | Type | Description |
---|---|---|
HORIZONTAL | Number | An enumerated value representing horizontal layout for a scale widget. |
VERTICAL | Number | An enumerated value representing vertical layout for a scale widget. |