Skip to main content

ConnectorEditorActivateParams

Base options for activating a path editor.

Type Parameters

EL

EL

Properties

anchorPositionFinder()?

optional anchorPositionFinder: (el, elxy, vertex) => ObjectAnchorSpec

Optional function allowing you to specify the location of the placeholder when the user is dragging anchor.

Parameters

el

EL

elxy

PointXY

vertex

Vertex

Returns

ObjectAnchorSpec


anchorPositions?

optional anchorPositions: ObjectAnchorSpec[]

Optional array of allowed positions for anchors to be relocated to


deleteButton?

optional deleteButton: boolean

If true, show a button the user can use to delete the edge. Defaults to false.


deleteButtonClass?

optional deleteButtonClass: string

Classname to set on the delete button. Defaults to "vjs-edge-delete".


deleteButtonLocation?

optional deleteButtonLocation: number | number[]

Location on the path to put the delete button, as a measure of the length of the path. For instance, the default value of 0.1 means the delete button will be placed at a point that is 1/10th of the total length of the path. Note that you can supply an array of positions here and one delete button will be created for each entry.


onMaybeDelete()?

optional onMaybeDelete: (edge, connection, doDelete) => any

Optional interceptor to invoke when the user presses the delete button. If the user wishes to go ahead with the edge deletion, doDelete will be invoked.

Parameters

edge

Edge

connection

Connection<EL>

doDelete

(data) => any

Returns

any


overlays?

optional overlays: FullOverlaySpec[]

Optional array of overlays to decorate the edge with while it is being edited.