Class: CosmographDataManager
Constructors
Constructor
new CosmographDataManager(
_):CosmographDataManager
Parameters
| Parameter | Type | 
|---|---|
_ | ICosmographInternalApi | 
Returns
CosmographDataManager
Accessors
dataUploadPromise
Get Signature
get dataUploadPromise():
null|Promise<void>
Returns
null | Promise<void>
Methods
dataReady()
dataReady():
Promise<void>
Returns
Promise<void>
updateGraphData()
updateGraphData(
pointsChanged,linksChanged):Promise<boolean>
Parameters
| Parameter | Type | 
|---|---|
pointsChanged | boolean | 
linksChanged | boolean | 
Returns
Promise<boolean>
addPoints()
addPoints(
points):Promise<void>
Parameters
| Parameter | Type | 
|---|---|
points | CosmographPointInput[] | 
Returns
Promise<void>
addLinks()
addLinks(
links):Promise<void>
Parameters
| Parameter | Type | 
|---|---|
links | CosmographLinkInput[] | 
Returns
Promise<void>
removePointsByIndices()
removePointsByIndices(
indices,removeAttachedLinks):Promise<void>
Removes the points specified by the given indices from the current graph.
Parameters
| Parameter | Type | Default value | Description | 
|---|---|---|---|
indices | number[] | undefined | The indices of the points to remove. | 
removeAttachedLinks | boolean | true | Whether to also remove any links attached to the removed points. Defaults to true. | 
Returns
Promise<void>
A Promise that resolves when the points have been removed.
Remarks
Method will not remove points if removing passed indices will lead to empty graph, or if itās only point in the graph.
removePointsByIds()
removePointsByIds(
ids):Promise<void>
Removes the points specified by the given IDs from the current graph.
Parameters
| Parameter | Type | Description | 
|---|---|---|
ids | string[] | The IDs of the points to remove. | 
Returns
Promise<void>
A Promise that resolves when the points have been removed.
removeLinksByPointIdPairs()
removeLinksByPointIdPairs(
pairs):Promise<void>
Removes the links specified by the given point ID pairs from the current graph.
Parameters
| Parameter | Type | Description | 
|---|---|---|
pairs | [string, string][] | An array of point ID pairs representing the links to remove. | 
Returns
Promise<void>
A Promise that resolves when the links have been removed.
removeLinksByPointIndicesPairs()
removeLinksByPointIndicesPairs(
pairs):Promise<void>
Removes the links specified by the given point index pairs from the current graph.
Parameters
| Parameter | Type | Description | 
|---|---|---|
pairs | [number, number][] | An array of point index pairs representing the links to remove. | 
Returns
Promise<void>
A Promise that resolves when the links have been removed.