This namespace provides access to the properties of the Drop Down widget.
Example
Snap.widgets.dropdown.getValue("widget-id");
Methods
-
static getBorderColor(id) → {string}
-
Get widget border color
Parameters:
Name Type Description id
string Widget Id
Returns:
string -
static getBorderRadius(id) → {string}
-
Get widget border radius
Parameters:
Name Type Description id
string Widget Id
Returns:
string -
static getBorderStyle(id) → {string}
-
Get widget border style
Parameters:
Name Type Description id
string Widget Id
Returns:
string -
static getBorderWidth(id) → {string}
-
Get widget border width
Parameters:
Name Type Description id
string Widget Id
Returns:
string -
static getHeight(id) → {number}
-
Get widget height
Parameters:
Name Type Description id
number Widget Id
Returns:
number -
static getMargin(id, position) → {string}
-
Get widget margin
Parameters:
Name Type Description id
string Widget Id
position
string 'left', 'right', 'top', 'bottom', 'all' - if value not defined it will return all
Returns:
string -
static getPadding(id, position) → {string}
-
Get widget padding
Parameters:
Name Type Description id
string Widget Id
position
string 'left', 'right', 'top', 'bottom', 'all' - if value not defined it will return all
Returns:
string -
static getValue(id) → {Dropdown}
-
Get value of dropdown
Parameters:
Name Type Description id
string Widget Id
Returns:
Dropdown -
static getWidgetAlignment(id) → {string}
-
Get widget alignment (flex CSS)
Parameters:
Name Type Description id
string Widget Id
Returns:
string -
static getWidth(id) → {number}
-
Get widget width
Parameters:
Name Type Description id
string Widget Id
Returns:
number -
static setValue(id, selectortype, selectorValue)
-
Set value of dropdown
Parameters:
Name Type Description id
string Widget Id
selectortype
string Type of selector - "value" or "text"
selectorValue
string Matching value for selectorType