DiagramNodeMapping
A node mapping in a Diagram. Intended for advanced use cases where you need fine-grained controls over nodes, and the config options available in cells are not granular enough.
Extends
Omit<NodeMapping<BrowserElement>,"template"|"ignore"|"templateId">
Properties
allowLoopback?
optionalallowLoopback: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.
Inherited from
NodeOrPortMapping.allowLoopback
allowVertexLoopback?
optionalallowVertexLoopback:boolean
Whether or not to allow edges from a port back to the vertex it belongs to. Defaults to true.
Inherited from
NodeOrPortMapping.allowVertexLoopback
anchorPositionFinder?
optionalanchorPositionFinder: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.
Inherited from
VertexMapping.anchorPositionFinder
anchorPositions?
optionalanchorPositions:ObjectAnchorSpec[]
Optional array of anchor positions to use.
Inherited from
defaultSize?
optionaldefaultSize:Size
Optional default size to use for the vertex. This is not used to set the size in the DOM for a vertex - it is used to insert width and height values into the backing data for any vertex of this type that does not have them set.
Inherited from
Omit.defaultSize
edgeType?
optionaledgeType:string
Type to assign to edges connected to this vertex as a source.
Inherited from
events?
optionalevents:EVT
Optional map of event bindings.
Inherited from
Omit.events
maxConnections?
optionalmaxConnections:number
Maximum number of connections this vertex supports. Default is 1. A value of -1 means no limit.
Inherited from
mergeStrategy?
optionalmergeStrategy:string
When merging a type description into its parent(s), values in the child for connector, anchor and anchors will always overwrite any such values in the parent. But other values, such as overlays, 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 mergeStrategy:'override'.
Inherited from
BaseViewObjectMapping.mergeStrategy
parameters?
optionalparameters:Record<string,any>
A map of parameters that the template engine will merge with the backing data when rendering the vertex.
Inherited from
parent?
optionalparent:string|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.
Inherited from
templateIdResolver()?
optionaltemplateIdResolver: (data,ui,model,object) =>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 template and templateId.
Parameters
data
ui
UICore<BrowserElement>
model
object
Returns
string
Inherited from
Omit.templateIdResolver