Home Manual Reference Source Repository
public class | source

Matrix

Extends:

BaseShape → Matrix

Member Summary

Public Members
public

$el: *

Method Summary

Public Methods
public

encache(matrixEntity: *): {"resources": *, "tileWidths": *, "totalWidth": *, "height": *, "startTime": *, "stepDuration": *, "elements": *}

public
public

render(renderingCtx: *): *

public

update(renderingContext: *, cache: *)

Inherited Summary

From class BaseShape
public
public

[key]: *

public

[name]: *

public
public
public

describe(datum: *, x: *): *[]

Interface method that returns a value or description for salient features of the shape at the given x-coordinate (in time).

public

Destroy the shape and clean references.

public

encache(datum: Object | Array): Object

Interface method called by Layer~update, only for shapes with entity type.

public

Interface method to override when extending this base class.

public

inArea(renderingContext: Object, datum: Object | Array, x1: Number, y1: Number, x2: Number, y2: Number): Boolean

Interface method to override called by Layer~getItemsInArea.

public

install(accessors: Object<String, function>)

Interface method called by Layer when creating a shape.

public

render(renderingContext: Object): Element

Interface method called by Layer~render.

public

update(renderingContext: Object, datum: Object | Array)

Interface method called by Layer~update.

protected

Returns an object where keys are the accessors methods names to create and values are the default values for each given accessor.

protected

Returns the defaults for global configuration of the shape.

Public Members

public $el: * source

Override:

BaseShape#$el

Public Methods

public encache(matrixEntity: *): {"resources": *, "tileWidths": *, "totalWidth": *, "height": *, "startTime": *, "stepDuration": *, "elements": *} source

Interface method called by Layer~update, only for shapes with entity type.

Called once for a given entity, to return any information derived from it that will be used subsequently when rendering. If this method returns a non-null object, then that object will be passed to the update method subsequently instead of the original entity datum. (If you want to retain access to the original entity, stash it in your cache object as well. Otherwise it may be GC'd if nobody else needs it.)

Override:

BaseShape#encache

Params:

NameTypeAttributeDescription
matrixEntity *

Return:

{"resources": *, "tileWidths": *, "totalWidth": *, "height": *, "startTime": *, "stepDuration": *, "elements": *}

public getClassName(): string source

Interface method to override when extending this base class. The method is called by the Layer~render method. Returns the name of the shape, used as a class in the element group (defaults to 'shape').

Override:

BaseShape#getClassName

Return:

string

public render(renderingCtx: *): * source

Interface method called by Layer~render. Creates the DOM structure of the shape.

Override:

BaseShape#render

Params:

NameTypeAttributeDescription
renderingCtx *

Return:

*

public update(renderingContext: *, cache: *) source

Interface method called by Layer~update. Updates the DOM structure of the shape.

Override:

BaseShape#update

Params:

NameTypeAttributeDescription
renderingContext *
cache *