module:Checkbox

Checkbox class
checkbox demo

Constructor

new module:Checkbox(positionDefinition, optionsopt)

Checkbox constructor

Parameters:
NameTypeAttributesDescription
positionDefinitionPositionDefinition

Top-left corner

optionsCheckboxOptions<optional>

Specific options

Extends

Members

(static) defaultOptions :CheckboxOptions

Type:
  • CheckboxOptions

(static) MARGIN :Number

Margin around the filling square in ratio

Type:
  • Number

height

Get it's height

height

Set it's height

value

Return whether it's checked

value

Change whether it's checked

width

Get it's width

width

Set it's width

Methods

toggle(newValueopt) → {Boolean}

Inverse whether it's checked

Parameters:
NameTypeAttributesDescription
newValueBoolean<optional>

If defined, will force the value

Returns:
Type: 
Boolean

Type Definitions

CheckboxOptions

Type:
  • Object
Properties
NameTypeAttributesDefaultDescription
sizeNumber<optional>
20

Width and height of the checkbox

valueBoolean<optional>
false

Whether it's check ot not