API Docs for: v2.1.0
Show:

CGSGNodeColorPicker Class

A color Picker

Constructor

CGSGNodeColorPicker

(
  • x
  • y
)

Parameters:

Methods

_onClickHandler

(
  • event
)
private

Parameters:

  • event Event

_onMouseOverHandler

(
  • event
)
private

Parameters:

  • event Event

getColorAt

(
  • absolutePosition
)
Object

Parameters:

  • absolutePosition CGSGPosition

    position of the cursor inside the colorPicker

Returns:

Object:

Object with {r:x, g:x, b:x} value

render

(
  • context
)
protected

Custom rendering. Must be defined to allow the traverser to render this node

Parameters:

  • context CanvasRenderingContext2D

    the context into render the node

Properties

_imgData

ImageData private

classType

String

Default: "CGSGNodeButton"

onClickColor

Function

Event fired when the user click on the color picker. Return a {r, g, b} Object.

Default: null

onOverColor

Function

Event fired when the mice cursor move over the color picker. Return a {r, g, b} Object.

Default: null