API Docs for:
Show:

Node Class

Methods

getMatrix

() CSSMatrix2d

Helper method to get the node's current 2d transfom matrix.

Returns:

inverseTransform

(
  • transitionConfig
  • callbackFunction
)
chainable

Transforms the node by the inverse of the nodes current 2d transform matrix.

Parameters:

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

multiplyMatrix

(
  • matrix
  • transitionConfig
  • callbackFunction
)
chainable

Transforms the node by multiplying the nodes current 2d transform matrix with another matrix.

Parameters:

  • matrix CSSMatrix2d

    The matrix to multiply.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

rotate

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Rotates the node clockwise.

Parameters:

  • angle Number

    The angle specified in degrees.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

rotateRad

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Rotates the node clockwise.

Parameters:

  • angle Number

    The angle specified in radians.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

scale

(
  • scaleFactor
  • transitionConfig
  • callbackFunction
)
chainable

Scales the node horizontally and vertically.

Parameters:

  • scaleFactor Number

    The horizontal and vertical scale factor.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

scaleXY

(
  • scaleFactorX
  • scaleFactorY
  • transitionConfig
  • callbackFunction
)
chainable

Scales the node horizontally and vertically.

Parameters:

  • scaleFactorX Number

    The horizontal scale factor.

  • scaleFactorY Number

    The vertical scale factor.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

skewX

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Skews the node horizontally.

Parameters:

  • angle Number

    The horizontal skew angle specified in degrees.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

skewXRad

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Skews the node horizontally.

Parameters:

  • angle Number

    The horizontal skew angle specified in radians.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

skewY

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Skews the node vertically.

Parameters:

  • angle Number

    The vertical skew angle specified in degrees.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

skewYRad

(
  • angle
  • transitionConfig
  • callbackFunction
)
chainable

Skews the node vertically.

Parameters:

  • angle Number

    The vertical skew angle specified in radians.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

transform

(
  • matrix
  • transitionConfig
  • callbackFunction
)
chainable

Transforms the node by the given matrix.

Parameters:

  • matrix CSSMatrix2d

    The 2d transform matrix.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.

translate

(
  • x
  • y
  • transitionConfig
  • callbackFunction
)
chainable

Translates the node horizontally and vertically.

Parameters:

  • x Number

    The amount to translate horizontally.

  • y Number

    The amount to translate vertically.

  • transitionConfig Object

    Optional. If defined, and if the transition module is available, a transition will be used to transform the node. This object is passed along to the transition method.

  • callbackFunction Function

    Optional. Whether or not transition is used, the callback function, if defined, will get called when the transform is complete.