set the node datum accessor
Sets the id node datum accessor to the given IdNodeDatum and returns this Connect. This function allows you to decide what data to attach to nodes created via the connect method. The default is just the id string.
(data) => data
Get the current id node datum operator
set the single node allowance
Sets the allowance for single nodes. If enabled and the source id equals the target id, then a single node with no parents will be created. Otherwise a self loop will be created which will result in an error. Note only single nodes without parents or children need to be specified this way, otherwise any other connection to a node will create it.
(default: false
)
get the current single node setting.
set the source id accessor
Sets the source accessor to the given Id and returns this Connect. This should return the source id of the link data. The default accessor is:
([source, ]) => source
Gets the current sourceId accessor.
set the target id accessor
Sets the target accessor to the given Id and returns this Connect. This should return the target id of the link data. The default accessor is:
([, target]) => target
Gets the current targetId accessor.
Generated using TypeDoc
an operator that constructs a MutGraph from link data.
Create a default connect operator with graphConnect. The accessor for the source id string, target id string, and whether to allow single nodes can all be modified.
Links in the dag will have the same data as the objects passed in, and nodes will have the ids referenced as either the source or the target.