new AnimationViewModel
The ViewModel for the Animation widget.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
clockViewModel |
ClockViewModel |
<optional> |
The ClockViewModel instance to use. |
Throws:
DeveloperError
: clockViewModel is required.
See:
Source:
Members
-
clockViewModel :ClockViewModel
-
The ClockViewModel instance to use.
-
dateLabel :Observable
-
The string representation of the current date.
-
faster :Command
-
The command to increase the speed of animation.
-
multiplierLabel :Observable
-
The string representation of the current multiplier.
-
pauseViewModel :ToggleButtonViewModel
-
The pause toggle button.
-
playForwardViewModel :ToggleButtonViewModel
-
The play toggle button.
-
playRealtimeViewModel :ToggleButtonViewModel
-
The realtime toggle button.
-
playReverseViewModel :ToggleButtonViewModel
-
The reverse toggle button.
-
shuttleRingAngle :Observable
-
The current shuttle ring Angle.
-
shuttleRingDragging :Observable
-
Indicates if the shuttle ring is currently being dragged.
-
slower :Command
-
The command to decrease the speed of animation.
-
snapToTicks :Observable
-
A boolean observable indicating if dragging the shuttle ring should cause the multiplier to snap to the defined tick values rather than interpolating between them.
- Default Value:
- false
-
timeLabel :Observable
-
The string representation of the current time.
-
<static> defaultTicks
-
Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.
Methods
-
getDateFormatter
-
Returns:
Function The current date format function. -
getShuttleRingTicks
-
Returns:
The array of known clock multipliers associated with the shuttle ring. -
getTimeFormatter
-
Returns:
Function The current time format function. -
setDateFormatter
-
Sets the current date format function.
Parameters:
Name Type Description dateFormatter
Function A function which takes a JulianDate and an AnimationViewModel instance and returns a string representation of the calendar date portion. Throws:
DeveloperError : timeFormatter must be a function. -
setShuttleRingTicks
-
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.
Parameters:
Name Type Description positiveTicks
The list of known positive clock multipliers to associate with the shuttle ring. Throws:
DeveloperError : positiveTicks is required. -
setTimeFormatter
-
Sets the current time format function.
Parameters:
Name Type Description timeFormatter
Function A function which takes a JulianDate and an AnimationViewModel instance and returns a string representation of the time portion. Throws:
DeveloperError : timeFormatter must be a function. -
<static> defaultDateFormatter
-
The default date formatter used by new instances.
Parameters:
Name Type Description date
JulianDate The date to be formatted viewModel
AnimationViewModel The AnimationViewModel instsance requesting formatting. Returns:
String The string representation of the calendar date portion of the provided date. -
<static> defaultTimeFormatter
-
The default time formatter used by new instances.
Parameters:
Name Type Description date
JulianDate The date to be formatted viewModel
AnimationViewModel The AnimationViewModel instsance requesting formatting. Returns:
String The string representation of the time portion of the provided date.