Constructor
new SVGButton(file, options)
Create an SVG button control.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
string | The SVG file name String. |
options |
Object | Configuration options. |
- Source:
Methods
alternate()
Alternate the SVG images for this control.
- Source:
draw()
Draw this control.
- Source:
erase()
Erase this control.
- Source:
initialize(parentElement, width, height)
Initialize this control with the specified parameters.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
element | The parent element. |
width |
number | The width to use for the SVG image. |
height |
number | The height to use for the SVG image. |
- Source:
reset()
Set the SVG image for this control to the default image.
- Source:
setFile(file, alternateFile)
Set the image file and (optionally) the alternate image file.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
string | A string representing the SVG file name and path. |
alternateFile |
string | A string representing the alternate SVG file name and path. |
- Source:
setOption(name, value)
Set the value for the specified option if it exists in this control.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of the option. |
value |
string | The value to set for the option. |
- Source:
setOptions(options)
Set all options for this control. Note that this method completely replaces all existing options with the specified options.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | The options to replace existing options. |
- Source: