meteoJS/timeline/visualisation/text . Text
Source: timeline/
Show current selected time of a timeline as text.
import Text from 'meteojs/timeline/visualisation/Text';
new Text(options)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
|
Options. |
Methods
attachEventListener(obj, listener, func[, thisArg])
Attach an event listener on an object. Object could be a jQuery-object or
an object using module:meteoJS/events
.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
obj |
|
|
Object to put the event listener on. |
listener |
|
|
Event listener key. |
func |
|
|
Function to be executed when event is triggered. |
thisArg |
|
Yes |
This in the function func when event triggered. |
emptyNode()
Called to empty the output node. Mainly if the output is muted. Prerequisite: this.options.node must be defined.
getOutputTimezone() → (string or undefined)
Gets current value of output timezone.
- Inherited from
- module:meteoJS/timeline/visualisation.Visualisation#getOutputTimezone
- Returns
-
Output timezone.
getTimelineTimes() → Array of Date
Returns the times to display. This could be either all times in the timeline or only the enabled times or the all enabled times. The user of the visualisation object select this by the options.
- Inherited from
- module:meteoJS/timeline/visualisation.Visualisation#getTimelineTimes
- Returns
-
Times.
onChangeTime()
Called if the timeline triggers the
module:meteoJS/timeline#change:time
event.
Prerequisite: this.options.node must be defined.
onChangeTimes()
Called if the timeline triggers the module:meteoJS/timeline#change:times
or module:meteoJS/timeline#change:enabledTimes
event.
Prerequisite: this.options.node must be defined.
onInitNode(isListenersDefined)
Called once an output node is set. Prerequisite: this.options.node must be defined.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
isListenersDefined |
|
|
True if the event listeners are already set. |
setNode(node) → module:meteoJS/timeline/visualisation.Visualisation
Sets jQuery-Node for output.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
node |
|
|
Node, undefined to mute the output. |
- Inherited from
- module:meteoJS/timeline/visualisation.Visualisation#setNode
- Returns
-
This.
setOutputTimezone(outputTimezone) → module:meteoJS/timeline/visualisation.Visualisation
Sets output timezone, undefined for UTC.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
outputTimezone |
|
|
Timezone for datetime output. |
- Inherited from
- module:meteoJS/timeline/visualisation.Visualisation#setOutputTimezone
- Returns
-
This.
timeToText(time, format) → string
Converts a Date-object to a string.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
time |
|
|
Time. |
format |
|
|
Format string, passed to the . |
- Inherited from
- module:meteoJS/timeline/visualisation.Visualisation#timeToText
- Returns
-
String.