Class: AnimationViewModel

AnimationViewModel

new AnimationViewModel(clockViewModel)

View model of Animation widget.

Name Type Description
clockViewModel ClockViewModel

The ClockVNet instance to be used.

See:

Members

static defaultDateFormatterAnimationViewModel~DateFormatter

Get or set the default date format used for new instances.

static defaultTicksArray.<Number>

Get or set the default array of known clock multipliers associated with new instances of the shuttle loop.

static defaultTimeFormatterAnimationViewModel~TimeFormatter

Gets or sets the default time formatter used by new instances.

clockViewModelClockViewModel

Obtain the clock view model.

Get or set the function to format the date to be displayed.

Default Value:
AnimationViewModel.defaultDateFormatter

dateLabelString

Get the string representation of the current date. This attribute is observable.

fasterCommand

Get commands that can improve animation speed.

multiplierLabelString

Get the string representation of the current multiplier. This attribute is observable.

pauseViewModelToggleButtonViewModel

Retrieve the pause switch button view model.

playForwardViewModelToggleButtonViewModel

Obtain the view model of the playback switch button.

playRealtimeViewModelToggleButtonViewModel

Obtain real-time switch button view model.

playReverseViewModelToggleButtonViewModel

Retrieve the reverse switch button view model.

shuttleRingAngleNumber

Get or set the current shuttle loop angle. This attribute is observable.

shuttleRingDraggingBoolean

Get or set whether the shuttle loop is being dragged. This attribute is observable.

Default Value:
false

slowerCommand

Get the command to slow down the animation speed.

snapToTicksBoolean

Gets or sets whether dragging the shuttle loop will cause the multiplier to closely adhere to the defined scale value, rather than interpolating between them. This attribute is observable.

Default Value:
false

Get or set the function for formatting the time to be displayed.

Default Value:
AnimationViewModel.defaultTimeFormatter

timeLabelString

Get a string representation of the current time. This attribute is observable.

Methods

getShuttleRingTicks(){Array.<Number>}

Obtain a copy of the known positive clock multiplier array associated with the shuttle loop.

Returns:
Type Description
Array.<Number> A known clock multiplier array related to the shuttle loop.

setShuttleRingTicks(positiveTicks)

Set a known positive clock multiplier array associated with the shuttle loop. These values will create negative equivalents for them and set the minimum value of both. And the maximum range value of the space shuttle ring and the value at which it is broken. When a single click. These values do not need to be sorted in order, as they will be sorted and duplicate values will be automatically removed.

Name Type Description
positiveTicks Array.<Number>

A known positive clock multiplier array related to the shuttle loop.

Type Definitions

DateFormatter(date, viewModel){String}

A function that formats dates for display.

Name Type Description
date JulianDate

The date to be formatted.

viewModel AnimationViewModel

Request a formatted AnimationVNet instance.

Returns:
Type Description
String The string representation of the calendar date portion of the provided date.

TimeFormatter(date, viewModel){String}

A function that formats time for display.

Name Type Description
date JulianDate

The date to be formatted.

viewModel AnimationViewModel

Request a formatted AnimationVNet instance.

Returns:
Type Description
String The string representation of the time part of the provided date.