Members
Methods
addKeyframe(arg0_date, arg1_data, arg2_optionsopt) → {Object}
Adds a new keyframe/state mutation at the given date, typically the head state. The provided arg1_data and optional relation/tag mutations are merged into the resolved timeline, and the entire diff chain is rebuilt so the head remains the latest full snapshot.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_date |
Date
|
any
|
||||||||||||||||||||||||||||||
arg1_data |
Object
|
||||||||||||||||||||||||||||||
arg2_options |
Object
|
<optional> |
|
Returns:
- Type:
-
Object
addRelation(arg0_date, arg1_relation_obj)
Adds a relation object to the selected date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_date |
Date
|
any
|
|
arg1_relation_obj |
Object
|
deleteKeyframe(arg0_date) → {boolean}
Deletes the keyframe at the given date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_date |
Date
|
any
|
Returns:
- Type:
-
boolean
draw()
Draws the Ontology. Should be overridden by subclasses.
- Source:
getElement(arg0_optionsopt) → {HTMLElement}
Returns an HTMLElement representing this Ontology.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_options |
Object
|
<optional> |
|
Returns:
- Type:
-
HTMLElement
getFirstKeyframeWithProperty(arg0_property) → {Object|null}
Returns the first keyframe whose resolved state contains the given property key.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_property |
string
|
Returns:
- Type:
-
Object|null
getLastKeyframeWithProperty(arg0_property) → {Object|null}
Returns the last keyframe whose resolved state contains the given property key.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_property |
string
|
Returns:
- Type:
-
Object|null
getState(arg0_date) → {Object}
Returns the fully-resolved state at a given date. If the date fails between two keyframes, the earlier keyframe's resolved state is returned. If the date is past the head, the head snapshot is returned. If before all keyframes, an empty object is returned.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_date |
Date
|
any
|
Returns:
- Type:
-
Object
getTimelineElement(arg0_optionsopt) → {HTMLElement}
Returns an HTMLElement representing this Ontology's timeline.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg0_options |
Object
|
<optional> |
|
Returns:
- Type:
-
HTMLElement
jumpToKeyframe(arg0_date) → {Object|null}
Jumps to a specific keyframe and calls the draw function for the Ontology.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_date |
Returns:
- Type:
-
Object|null
mergeState(arg0_state_array)
Merges an incoming state array into the current Ontology. Resolves both states to snapshots, merges them, and rebuilds the diff chain.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_state_array |
Array.<Object>
|
moveKeyframe(arg0_date, arg1_date) → {boolean}
Moves a keyframe from arg0_date to arg1_date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_date |
Date
|
any
|
|
arg1_date |
Date
|
any
|
Returns:
- Type:
-
boolean
removeRelation(arg0_relation, arg1_date)
Removes a single relation from a specified date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_relation |
Object
|
string
|
|
arg1_date |
Date
|
any
|
removeRelations(arg0_relations, arg1_date)
Removes multiple relations from a specified date.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_relations |
Object
|
string
|
|
arg1_date |
Date
|
any
|