Click or drag to resize

Telogis.GeoBase.Widgets.SliderSkin

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release

A small class collecting all the customizable appearance information for a zoom / slider map control and presenting some simple methods to help apply it.

Constructor
NameDescription
Widgets.SliderSkin(config)

Arguments

  • config (Object) - The configuration options for the slider skin.

    Properties
    NameTypeDescription
    flippedNumber

    Alternates the positions of the zoom in/out buttons may be either Widgets.SliderSkin.NOT_FLIPPED or Widgets.SliderSkin.FLIPPED.

    Defaults to Widgets.SliderSkin.NOT_FLIPPED.
    folderString

    The base URL to load the slider skin's images from.

    Defaults to ''.
    layoutNumber

    The direction in which scales using this skin are to be laid out. May be either Widgets.SliderSkin.HORIZONTAL or Widgets.SliderSkin.VERTICAL.

    Defaults to Widgets.SliderSkin.HORIZONTAL.
    leftButtonSrcString

    The URL of the image to use to display the cell on the left (or top, in the case of vertical alignments) of the slider table, which serves as a "zoom out" button. Relative to Widgets.SliderSkin.config.folder.

    Defaults to 'left-button.png'.
    rightButtonSrcString

    The URL of the image to use to display the cell on the right (or bottom, in the case of vertical alignments) of the slider table, which serves as a "zoom in" button. Relative to Widgets.SliderSkin.config.folder.

    Defaults to 'right-button.png'.
    selTickSrcString

    The URL of the image to use to display the current zoom-level "tick" in the slider table. Relative to Widgets.SliderSkin.config.folder.

    Defaults to 'tick-sel.png'.
    tickSrcString

    The URL of the image to use to display a zoom-level "tick" in the slider table. Relative to Widgets.SliderSkin.config.folder.

    Defaults to 'tick.png'.
Functions
NameDescription
createCells (String id, Element tbody, Number tickCount)

Creates and performs basic initializations for all of the cells that will be displayed in the slider widget's table element. These may be created in either a horizontal or vertical layout, depending on the configuration the skin was created with. Once created, each cell is adjusted to display an appropriate image, and returned in an array.

Arguments
  • id (String) - The ID of the calling Widgets.Slider, from which to form more specified strings to identify its cells by.

  • tbody (Element) - The tbody element of the calling Widgets.Slider to append rows of cells to.

  • tickCount (Number) - The number of zoom-tick cells to create.

Returns

Array - The list of table cells that constitute the slider -- the left and right buttons, and the zoom-tick cells in-between.

getSize (Number tickCount)

Finds the dimensions of a slider widget using this skin, which depend on the number of zoom ticks it displays.

Arguments
  • tickCount (Number) - The number of tick cells displaying in the slider to find the size of.

Returns

Size - The pixel width and height of sliders that use this skin, with a given number of zoom ticks.

isFlipped ()

Gets the flipped state of the sliderskin.

Returns

boolean - Returns true if the sliderskin is flipped.

selectTick (Element elem)

Sets the CSS properties of a table cell so that it will display the skin's selected tick image. Should only be called once the skin has loaded.

Arguments
  • elem (Element) - The td element to use as the active slider tick.

unselectTick (Element elem)

Sets the CSS properties of a table cell so that it will display the skin's unselected tick image. Should only be called once the skin has loaded.

Arguments
  • elem (Element) - The td element to use as a slider tick.

Properties
NameTypeDescription
FLIPPEDNumber

An enumerated value representing a layout that is not flipped for a scale widget.

HORIZONTALNumber

An enumerated value representing horizontal layout for a scale widget.

NOT_FLIPPEDNumber

An enumerated value representing the flipped layout for a scale widget.

VERTICALNumber

An enumerated value representing vertical layout for a scale widget.