NodeOrPortMapping
Base view mapping for nodes and ports (and groups, since they extend nodes)
| Name | Type | Description |
|---|---|---|
| allowLoopback? | boolean | Whether or not to allow edges from this vertex back to itself. Defaults to true. This flag will not prevent an edge from a port back to the node/group to which it belongs - for that, see . |
| allowVertexLoopback? | boolean | Whether or not to allow edges from a port back to the vertex it belongs to. Defaults to true. |
| anchorPositionFinder? | AnchorPositionFinder<any> | Optional function to call on connection drop, to determine the location for the target anchor for the new connection. Returning null from this indicates no preference, and VisuallyJs will use its own computed value. |
| anchorPositions? | Array<ObjectAnchorSpec> | Optional array of anchor positions to use. |
| edgeType? | string | Type to assign to edges connected to this vertex as a source. |
| events? | EVT | Optional map of event bindings. |
| maxConnections? | number | Maximum number of connections this vertex supports. Default is 1. A value of -1 means no limit. |
| mergeStrategy? | string | When merging a type description into its parent(s), values in the child for , and will always overwrite any such values in the parent. But other values, such as , will be merged with their parent's entry for that key. You can force a child's type to override every corresponding value in its parent by setting . |
| parameters? | Record<string,any> | A map of parameters that the template engine will merge with the backing data when rendering the vertex. |
| parent? | string | Array<string> | Optional ID of one or more edge definitions to include in this definition. The child definition is merged on top of the parent definition(s). Circular references are not allowed and will throw an error. |
| template? | string | Template to use for a vertex of this type. This is only for 'vanilla' VisuallyJs: if you are using an integration such as React/Angular/Vue/Svelte, you will not need to provide this. If you provide this and also , this will take precedence. |
| templateId? | string | ID of the template to use for a vertex of this type. This is only for 'vanilla' VisuallyJs: if you are using an integration such as React/Angular/Vue, you will not need to provide this. This parameter is distinct from in that when you provide you are expecting VisuallyJs to resolve the template for you, either from a block in a call, or by looking for a script element in the DOM with the appropriate ID. If you provide this and also , will take precedence. |
| templateIdResolver? | (data:ObjectData, ui:UICore<E>, model:VisuallyJsModel, object:Vertex) => string | A function that can resolve the ID of the template to use for the given vertex. This is an advanced configuration that is not often needed, and is only for 'vanilla' VisuallyJs. This function will take precedence over both and . |