Class ColorControl extends BaseControl

Html control for color selection

Source : file controls/colorControl/ColorControl.js at line 40

Constructor

new ColorControl ( options )

Constructor

Source : file controls/colorControl/ColorControl.js at line 75

Parameters

Name Type Description
options Object

An object with the options ( headerText, cssColor )

Public getters and setters

readonly get cssColor : String

The color selected in the control in the css hex format ( #rrggbb )

Source : file controls/colorControl/ColorControl.js at line 111

Public methods

destructor ( )

The destructor.

Source : file controls/colorControl/ColorControl.js at line 100

onColorButtonClick ( cssColor )

Change the value of the r, g and b inputs according to the given cssColor Change the sample color according to the given css color Called by the ColorButtonClickEL.handleEvent method

Source : file controls/colorControl/ColorControl.js at line 134

Parameters

Name Type Description
cssColor String

The color to use in the css format

onRedSliderInput ( red )

Change the red component of the color buttons, according to the red slider value. Called by the RedSliderInputEL.handleEvent ( ) method

Source : file controls/colorControl/ColorControl.js at line 123

Parameters

Name Type Description
red Number

The value of the red component

onRgbInput ( cssColor )

Change the sample color according to the given Color

Source : file controls/colorControl/ColorControl.js at line 144

Parameters

Name Type Description
cssColor String

The css color to use

Private properties

#colorButtonsControlElement : HTMLElement

The element with the color buttons

Source : file controls/colorControl/ColorControl.js at line 47

#redSliderControlElement : HTMLElement

The element with the red slider

Source : file controls/colorControl/ColorControl.js at line 54

#rgbInputsControlElement : HTMLElement

The element with the r, g, and b inputs

Source : file controls/colorControl/ColorControl.js at line 61

#sampleControlElement : HTMLElement

The element with the sample color

Source : file controls/colorControl/ColorControl.js at line 68