Class: AnimationViewModel

AnimationViewModel

new AnimationViewModel(clockViewModel)

The view model for the Animation widget.
Parameters:
Name Type Description
clockViewModel ClockViewModel The ClockViewModel instance to use.
Source:
See:

Members

(static) defaultDateFormatter :AnimationViewModel~DateFormatter

Gets or sets the default date formatter used by new instances.
Type:
Source:

(static) defaultTicks :Array.<Number>

Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.
Type:
  • Array.<Number>
Source:

(static) defaultTimeFormatter :AnimationViewModel~TimeFormatter

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

clockViewModel :ClockViewModel

Gets the clock view model.
Type:
Source:

dateFormatter :AnimationViewModel~DateFormatter

Gets or sets the function which formats a date for display.
Type:
Default Value:
  • AnimationViewModel.defaultDateFormatter
Source:

dateLabel :String

Gets the string representation of the current date. This property is observable.
Type:
  • String
Source:

faster :Command

Gets a command that increases the speed of animation.
Type:
Source:

multiplierLabel :String

Gets the string representation of the current multiplier. This property is observable.
Type:
  • String
Source:

pauseViewModel :ToggleButtonViewModel

Gets the pause toggle button view model.
Type:
Source:

playForwardViewModel :ToggleButtonViewModel

Gets the play toggle button view model.
Type:
Source:

playRealtimeViewModel :ToggleButtonViewModel

Gets the realtime toggle button view model.
Type:
Source:

playReverseViewModel :ToggleButtonViewModel

Gets the reverse toggle button view model.
Type:
Source:

shuttleRingAngle :Number

Gets or sets the current shuttle ring angle. This property is observable.
Type:
  • Number
Source:

shuttleRingDragging :Boolean

Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
Type:
  • Boolean
Default Value:
  • false
Source:

slower :Command

Gets a command that decreases the speed of animation.
Type:
Source:

snapToTicks :Boolean

Gets or sets whether dragging the shuttle ring should cause the multiplier to snap to the defined tick values rather than interpolating between them. This property is observable.
Type:
  • Boolean
Default Value:
  • false
Source:

timeFormatter :AnimationViewModel~TimeFormatter

Gets or sets the function which formats a time for display.
Type:
Default Value:
  • AnimationViewModel.defaultTimeFormatter
Source:

timeLabel :String

Gets the string representation of the current time. This property is observable.
Type:
  • String
Source:

Methods

getShuttleRingTicks() → {Array.<Number>}

Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
Source:
Returns:
The array of known clock multipliers associated with the shuttle ring.
Type
Array.<Number>

setShuttleRingTicks(positiveTicks)

Sets the array of positive known clock multipliers to associate with the shuttle ring. These values will have negative equivalents created for them and sets both the minimum and maximum range of values for the shuttle ring as well as the values that are snapped to when a single click is made. The values need not be in order, as they will be sorted automatically, and duplicate values will be removed.
Parameters:
Name Type Description
positiveTicks Array.<Number> The list of known positive clock multipliers to associate with the shuttle ring.
Source:

Type Definitions

DateFormatter(date, viewModel) → {String}

A function that formats a date for display.
Parameters:
Name Type Description
date JulianDate The date to be formatted
viewModel AnimationViewModel The AnimationViewModel instance requesting formatting.
Source:
Returns:
The string representation of the calendar date portion of the provided date.
Type
String

TimeFormatter(date, viewModel) → {String}

A function that formats a time for display.
Parameters:
Name Type Description
date JulianDate The date to be formatted
viewModel AnimationViewModel The AnimationViewModel instance requesting formatting.
Source:
Returns:
The string representation of the time portion of the provided date.
Type
String