new ClockViewModel(clock)
A view model that provides a clock for the user interface.
| Name | Type | Description |
|---|---|---|
clock |
Clock |
optional
If the clock object encapsulated in this view model is undefined, a new instance will be created. |
- See:
Members
-
canAnimateBoolean
-
Get or set whether the clock can be animated. See Clock # canAnimate. This attribute is observable.
-
clockClock
-
Get the underlying clock.
-
clockRangeClockRange
-
Get or set the clock range setting. See Clock # clockRange. This property is observable.
-
clockStepClockStep
-
Get or set clock step settings. See Clock # clockStep. This property is observable.
-
currentTimeJulianDate
-
Get or set the current time. See Clock # CurrentTime. This property is observable.
-
multiplierNumber
-
Get or set clock multiplier. See Clock # multiplier. This attribute is observable.
-
shouldAnimateBoolean
-
Should the clock be animated to obtain or set. See Clock # should Animate. This attribute is observable.
-
startTimeJulianDate
-
Get or set the start time of the clock. See Clock # startTime. This property is observable.
-
stopTimeJulianDate
-
Get or set the stop time of the clock. See Clock # stopTime. This property is observable.
-
systemTimeJulianDate
-
Get the current system time. This attribute is observable.
Methods
-
destroy()
-
Destroy the view model. When the view model is no longer needed, it should be called to properly clean up the view model.
-
isDestroyed(){Boolean}
-
Returns:
Type Description Boolean If the object has been destroyed, it is true; otherwise, it is false. -
synchronize()
-
Update the view model with the content of the underlying clock. If the underlying clock has changed and Clock.tick has not been called, it can be called to force an update to the view model.