BrowserUIEdgeOptions
Common options for edges in the Browser UI package.
| Name | Type | Description |
|---|---|---|
| activeEdit? | boolean | Defaults to true, meaning if edges are editable then any new edge is automatically marked edited and its geometry is stored. |
| allowUnattached? | boolean | Whether or not to allow edges whose source and/or target is not connected to a vertex but is anchored to some point on the canvas. If you need more fine-grained control (such as some edge types should support this and others should not), use the flag of an edge type. Defaults to false. |
| anchor? | AnchorSpec | Default anchor to use for both source and target of edges. |
| anchors? | [AnchorSpec, AnchorSpec] | Anchors to use as source, target of edges. This will take precedence over . |
| astarGridCellSize? | number | Size of each cell in the grid that the AStar routine uses to calculate paths that avoid vertices. This defaults to 10 pixels and is not something you'll really need to change. If you do change it, keep in mind that a) a smaller grid size increases the runtime of the routine, and b) a large grid size will render the UI unusable. |
| astarVertexBorder? | number | Number of cells to pad each vertex with that act as its border: edges will be routed around the border wherever possible. Defaults to 2 |
| astarVertexBuffer? | number | Number of cells to pad each vertex with that act as its buffer: edges will be routed around the buffer wherever possible. Defaults to 2 - but note this value is added the vertex border, whose default is 2, so the computed default is 4 grid cells. |
| avoidVertices? | boolean | If true, edges will attempt to avoid vertices. |
| connector? | ConnectorSpec | Default connector to use for edges. This will be used in the event that VisuallyJs does not find a connector spec for a given edge in its type definition. |
| detachable? | boolean | Whether or not edges should be detachable via pointer/touch events by default. The default value for this is true. This behaviour can be overridden by individual edge type definitions. |
| discardEditsOnDrag? | boolean | Defaults to false. When true, dragging either the source or target of some edge that has edits will cause those edits to be discarded. When false - the default value - Visually JS attempts to retain as many of the edits as possible while still catering for the fact that the source or target has moved. |
| editable? | boolean | If true, an EdgePathEditor will be registered on the Surface, with which you can interact via the and methods on the Surface. |
| editOnTap? | boolean | Defaults to true, meaning that when a user taps an edge it goes into edit mode. |
| inputMethod? | EdgeInputMethod | Input method for edges. Defaults to drag. |
| layerIndex? | number | This setting is only relevant when you are using an SVG container. By default, edges are drawn in a layer that appears in the DOM after the vertex layer, meaning edges will show above vertices. If you set this to 0, you can force the edge layer to the back. |
| outlineColor? | string | The default color to paint a connector's outline path. Defaults to . Can be overridden on a per-edge basis via the setting. |
| outlineWidth? | number | Default width to paint the outline path behind edge paths. Defaults to 20 pixels. Can be overridden on a per-edge basis via the setting. |
| overlays? | Array<OverlaySpec> | Default overlays to draw on each edge. |
| paintOutline? | boolean | Defaults to true. Paints an outline path behind the path drawn for an edge, which makes it easier for users to interact with the element on the canvas. The default width of the outline is specified by the setting. |
| propertyMappings? | EdgePropertyMappings | Optional set of mappings from property values to edge definitions. |
| reattach? | boolean | Whether or not edges that have been detached from their source or target via pointer/touch events should be reattached if they are dropped into whitespace. The default value for this is false: edges dropped in whitespace are discarded. This behaviour can be overridden in individual edge type definitions. |
| simpleEdgeStyles? | boolean | Defaults to true. Instructs the Surface to automatically extract , , , , and values from the backing data for edges, and to use these to set the appearance of a connection for that edge. |
| sourceMarker? | OverlaySpec | Shorthand for adding an overlay at location 0, with direction set to -1. |
| targetMarker? | OverlaySpec | Shorthand for adding an overlay at location 1 |