Class: SVGChecklistButton

SVGChecklistButton(file, options)

An SVG image button that displays a checklist of items when clicked.

Constructor

new SVGChecklistButton(file, options)

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

Methods

addItem(item)

Add the specified checklist item to this control.
Parameters:
Name Type Description
item Object The item to add.
Source:

addItems(items)

Add an array of checklist item to this control.
Parameters:
Name Type Description
items Object The array of items to add.
Source:

draw()

Draw this control.
Source:

drawChecklist()

Draw the checklist.
Source:

drawChecklistItem(item)

Draw the specified checklist item.
Parameters:
Name Type Description
item Object The item to draw.
Source:

erase()

Erase this control.
Source:

eraseChecklist()

Erase the checklist.
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:

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: