new AnimationViewModel
The view model 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
-
Gets the clock view model.
-
dateFormatter :Function
-
Gets or sets the current date formatting function, which takes a JulianDate and an AnimationViewModel instance and returns a string representation of the calendar date portion.
-
dateLabel :String
-
Gets the string representation of the current date. This property is observable.
- Default Value:
- undefined
-
faster :Command
-
Gets a command that increases the speed of animation.
-
multiplierLabel :String
-
Gets the string representation of the current multiplier. This property is observable.
- Default Value:
- undefined
-
pauseViewModel :ToggleButtonViewModel
-
Gets the pause toggle button view model.
-
playForwardViewModel :ToggleButtonViewModel
-
Gets the play toggle button view model.
-
playRealtimeViewModel :ToggleButtonViewModel
-
Gets the realtime toggle button view model.
-
playReverseViewModel :ToggleButtonViewModel
-
Gets the reverse toggle button view model.
-
shuttleRingAngle :Number
-
Gets or sets the current shuttle ring angle. This property is observable.
- Default Value:
- undefined
-
shuttleRingDragging :Boolean
-
Gets or sets whether the shuttle ring is currently being dragged. This property is observable.
- Default Value:
- false
-
slower :Command
-
Gets a command that decreases the speed of animation.
-
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.
- Default Value:
- false
-
timeFormatter :Function
-
Gets or sets the current time formatting function, which takes a JulianDate and an AnimationViewModel instance and returns a string representation of the time portion.
-
timeLabel :String
-
Gets the string representation of the current time. This property is observable.
- Default Value:
- undefined
-
<static> defaultTicks
-
Gets or sets the default array of known clock multipliers associated with new instances of the shuttle ring.
Methods
-
getShuttleRingTicks
-
Gets a copy of the array of positive known clock multipliers to associate with the shuttle ring.
Returns:
The array of known clock multipliers associated with the shuttle ring. -
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, and duplicate values will be removed.
Parameters:
Name Type Description positiveTicks
The list of known positive clock multipliers to associate with the shuttle ring. Throws:
DeveloperError : positiveTicks is required. -
<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 instance 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 instance requesting formatting. Returns:
String The string representation of the time portion of the provided date.