The mapping for the definition of an edge inside a view.

interface ViewEdgeOptions {
    anchor?: AnchorSpec;
    anchors?: [AnchorSpec, AnchorSpec];
    connector?: ConnectorSpec;
    cssClass?: string;
    detachable?: boolean;
    endpoint?: EndpointSpec;
    endpointHoverStyle?: EndpointStyle;
    endpointHoverStyles?: [EndpointStyle, EndpointStyle];
    endpointStyle?: EndpointStyle;
    endpointStyles?: [EndpointStyle, EndpointStyle];
    endpoints?: [EndpointSpec, EndpointSpec];
    events?: ViewEventOptions;
    hoverPaintStyle?: PaintStyle;
    label?: string;
    labelClass?: string;
    labelLocation?: number;
    labelLocationAttribute?: string;
    mergeStrategy?: string;
    outlineWidth?: number;
    overlays?: OverlaySpec[];
    paintStyle?: PaintStyle;
    parent?: string | string[];
    reattach?: boolean;
}

Hierarchy (view full)

Properties

anchor?: AnchorSpec

Spec for the anchor to use for both source and target for edges of this type.

anchors?: [AnchorSpec, AnchorSpec]

[source, target] anchor specs edges of this type.

connector?: ConnectorSpec

Name/definition of the connector to use. If you omit this, the default connector will be used.

cssClass?: string

CSS class to add to edges of the type in the UI

detachable?: boolean

Whether or not edges of this type should be detachable with the mouse. Defaults to true.

endpoint?: EndpointSpec

Optional spec to use for both the source and target endpoints for edges of this type.

endpointHoverStyle?: EndpointStyle

Optional paint style to use for hover on both the source and target endpoints for edges of this type.

endpointHoverStyles?: [EndpointStyle, EndpointStyle]

Optional paint style to use for hove on the [source, target] endpoints for edges of this type.

endpointStyle?: EndpointStyle

Optional paint style to use for both the source and target endpoints for edges of this type.

endpointStyles?: [EndpointStyle, EndpointStyle]

Optional paint styles to use for the [source, target] endpoints for edges of this type.

endpoints?: [EndpointSpec, EndpointSpec]

Optional specs for the [source, target] endpoints for edges of this type.

events?: ViewEventOptions

Optional map of event bindings.

hoverPaintStyle?: PaintStyle

Paint style to use for the edge when the pointer is hovering over it.

label?: string

Optional label to use for the edge. If this is set, a label overlay will be created and the value of label will be used as the overlay's label. This value can be parameterised, in order to extract a value from the edge's backing data, eg. if you set label:"{{name}}" then the Toolkit would attempt to extract a property with key name from the edge's backing data, and use that property's value as the label.

labelClass?: string

Optional css class to set on the label overlay created if label is set. This is a static string and does not support parameterisation like label does.

labelLocation?: number

Optional location for the label. If not provided this defaults to 0.5, but the label location can be controlled via the labelLocationAttribute.

labelLocationAttribute?: string

This defaults to labelLocation, and indicates the name of a property whose value can be expected to hold the location at which the label overlay should be located. The default value for this is labelLocation, but the key here is that the Toolkit looks in the edge data for labelLocation, so the location is dynamic, and can be changed by updating labelLocation. This parameter allows you to change the name of the property that the Toolkit will look for in the edge data.

mergeStrategy?: 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'.

outlineWidth?: number

Optional width of the edge's outline. Defaults to 0.

overlays?: OverlaySpec[]

Array of overlays to add to edges of this type.

paintStyle?: PaintStyle

Paint style to use for the edge.

parent?: 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.

reattach?: boolean

Whether or not when a user detaches a edge of this type it should be automatically reattached. Defaults to false.

Version :