Constructor
new StockIcon(name, stockNameopt, variantopt, activeNameopt, activeVariantopt, focusedNameopt, focusedVariantopt, selectedNameopt, selectedVariantopt, scaleopt, decorationopt, …args)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | the icon name (in normal state) |
|
stockName |
String |
<optional> |
the name of the stock (defaults to |
variant |
String |
<optional> |
the icon variant (in normal state) |
activeName |
String |
<optional> |
the icon name in active state |
activeVariant |
String |
<optional> |
the icon variant in active state |
focusedName |
String |
<optional> |
the icon name in focused state |
focusedVariant |
String |
<optional> |
the icon variant in focused state |
selectedName |
String |
<optional> |
the icon name in selected state |
selectedVariant |
String |
<optional> |
the icon variant in selected state |
scale |
Number |
<optional> |
icon scaling factor (defaults to |
decoration |
String |
<optional> |
icon decoration |
args |
* |
<repeatable> |
parent class parameters |
- Source:
Extends
Methods
(static) alterElement(element, attributes)
Alter a stock icon that has already been applied to an element, in place.
Parameters:
Name | Type | Description |
---|---|---|
element |
jQuery | |
attributes |
Object | the attributes to alter |
- Source:
alter(attributes)
Return an updated version of the icon by altering some of the attributes.
Parameters:
Name | Type | Description |
---|---|---|
attributes |
Object | the attributes to alter |
- Source:
Returns:
qui.icons.StockIcon
alterDefault(attributes)
Return an updated version of the icon by altering some of the attributes only if they are unset (null
).
This method allows creating an icon by providing default attribute values.
Parameters:
Name | Type | Description |
---|---|---|
attributes |
Object | the attributes to alter |
- Source:
Returns:
qui.icons.StockIcon
applyTo(element)
Apply the icon to an HTML element.
Parameters:
Name | Type | Description |
---|---|---|
element |
jQuery | the element to which the icon will be applied |
- Overrides:
- Source:
renderTo(element)
Effectively render the icon onto the HTML element.
Parameters:
Name | Type | Description |
---|---|---|
element |
jQuery | the element onto which the icon will be rendered |
- Overrides:
- Source:
toAttributes() → {Object}
Return a dictionary of icon attributes that can be passed to constructor.
- Overrides:
- Source:
Returns:
- Type
- Object
toMultiStateSpritesIcon() → (nullable) {qui.icons.MultiStateSpritesIcon}
Return a dictionary with attributes suitable to build a qui.icons.MultiStateSpritesIcon
.
- Source: