AnimatorSync

class AnimatorSync(val timeline: Timeline) : EventDispatcher

Synchronizes a map timeline with the loading state of the individual animators for each animatable layer that is active on a map.

Constructors

Link copied to clipboard
constructor(timeline: Timeline)

Properties

Link copied to clipboard
val eventFlow: MutableSharedFlow<Event>
Link copied to clipboard
Link copied to clipboard

If true, the timeline will be paused while any animators are loading.

Link copied to clipboard
open val TAG: String
Link copied to clipboard

Functions

Link copied to clipboard
fun add(layer: MapLayer<TileData, LayerRenderContext<Any>>)

Adds a layer to be synced.

Link copied to clipboard
fun off(event: String, listener: (Any) -> Unit)
Link copied to clipboard
fun on(event: String, listener: (Any) -> Unit)
Link copied to clipboard
fun remove(layer: MapLayer<TileData, LayerRenderContext<Any>>)

Removes a layer from the sync.

Link copied to clipboard

Tells the animator data providers to update their data.

Link copied to clipboard
Link copied to clipboard
fun trigger(event: Event)
fun trigger(event: String)
fun trigger(event: Event, valueMap: Map<String, Tile<TileData>>)
fun trigger(event: TimeSeriesEvent, dates: Array<Date>)

fun trigger(event: Event, intervalArray: MutableList<TimeInterval>, placeHolder: Int)

Renamed from trigger in js since type-erasure caused signature clash

Link copied to clipboard
fun triggerAny(event: String, data: Any)
Link copied to clipboard
fun triggerDates(event: String, dates: Map<String, Date>)
Link copied to clipboard
fun triggerDatesArray(event: String, dates: Array<Date>)
Link copied to clipboard
fun triggerDatesList(event: String, dates: List<Date>)