Home Manual Reference Source Repository
import TrackCollection from 'waves-ui/src/core/track-collection.js'
public class | source

TrackCollection

Extends:

Array → TrackCollection

Collection hosting all the Track instances registered into the timeline. It provides shorcuts to trigger render / update methods on tracks or layers. Extend built-in Array

Constructor Summary

Public Constructor
public

constructor(timeline: *)

Member Summary

Public Members
public set
public get

An array of all registered layers.

Method Summary

Public Methods
public

render()

Render all tracks and layers.

public

update(layerOrGroup: Layer | String)

Updates all tracks and layers.

public

Updates all Track containers, layers are not updated with this method.

public

updateLayers(layerOrGroup: Layer | String)

Updates all layers.

Public Constructors

public constructor(timeline: *) source

Params:

NameTypeAttributeDescription
timeline *

Public Members

public set height: Number source

TODO:

  • - Propagate to layers, not usefull for now.

public get layers: Array<Layer> source

An array of all registered layers.

Public Methods

public render() source

Render all tracks and layers. When done, the timeline triggers a render event.

public update(layerOrGroup: Layer | String) source

Updates all tracks and layers. When done, the timeline triggers a update event.

Params:

NameTypeAttributeDescription
layerOrGroup Layer | String

Filter the layers to update by passing the Layer instance to update or a groupId

public updateContainer() source

Updates all Track containers, layers are not updated with this method. When done, the timeline triggers a update:containers event.

public updateLayers(layerOrGroup: Layer | String) source

Updates all layers. When done, the timeline triggers a update:layers event.

Params:

NameTypeAttributeDescription
layerOrGroup Layer | String

Filter the layers to update by passing the Layer instance to update or a groupId