Class: SVGSwitchButton

SVGSwitchButton(file, options)

An SVG image as a switch button.

Constructor

new SVGSwitchButton(file, options)

Create an SVG button control for switching.
Parameters:
Name Type Description
file string The SVG file name String.
options Object Configuration options.
Author:
  • Lawrence Fyfe
Source:

Methods

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:

setFile(file)

Set the SVG image file.
Parameters:
Name Type Description
file string A string representing the SVG file name and path.
Source: