Class: ExpressionWidget

ExpressionWidget

Widget for displaying expression and manipulating the order of symbols

Constructor

new ExpressionWidget()

Source:

Methods

(static) createTileShape(img, color) → {ExpressionWidget.createTileShape.shape|createjs.Shape}

Creates tile's 'Shape' object
Parameters:
Name Type Description
img type
color type
Source:
Returns:
Type
ExpressionWidget.createTileShape.shape | createjs.Shape

checkTile(tile)

Sets tile to be checked
Parameters:
Name Type Description
tile Number number
Source:

draw(expression) → {undefined}

Sets new expression
Parameters:
Name Type Description
expression Array Expression to be drawn
Source:
Returns:
Type
undefined

getSolution() → {Array|ExpressionWidget.prototype.getSolution.array}

Returns current state of order of symbols
Source:
Returns:
Type
Array | ExpressionWidget.prototype.getSolution.array

moveTile(y)

Tilts the checked tile in y axes
Parameters:
Name Type Description
y type
Source:

putBackTile()

Puts the checked tile's y axes in its original position
Source:

resize(x, y, w, h)

Resizes the widget
Parameters:
Name Type Description
x number
y number
w number
h number
Source:

showArrows()

Sets arrows' position
Source:

updateTilesState()

Updates tile's color and displayed number
Source: