Interface ConnectorEditorActivateParams

interface ConnectorEditorActivateParams {
    anchorPositionFinder?: ((el, elxy, vertex) => ArrayAnchorSpec);
    anchorPositions?: ObjectAnchorSpec[];
    deleteButton?: boolean;
    deleteButtonClass?: string;
    deleteButtonLocation?: number | number[];
    onMaybeDelete?: ((edge, connection, doDelete) => any);
    overlays?: FullOverlaySpec[];
    snapToAnchors?: boolean;
}

Properties

anchorPositionFinder?: ((el, elxy, vertex) => ArrayAnchorSpec)

Optional function allowing you to specify the location of the placeholder when the user is dragging anchor. From 6.2.0 this is probably not of much use, as snapToAnchors defaults to true and positions the placeholder above the anchor on which it would be dropped if the user were to release the mouse button.

Type declaration

anchorPositions?: ObjectAnchorSpec[]

Optional array of allowed positions for anchors to be relocated to

deleteButton?: boolean

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

deleteButtonClass?: string

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

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

Type declaration

    • (edge, connection, doDelete): any
    • Parameters

      • edge: Edge
      • connection: Connection<Element>
      • doDelete: ((data) => any)
          • (data): any
          • Parameters

            • data: Record<string, any>

            Returns any

      Returns any

overlays?: FullOverlaySpec[]

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

snapToAnchors?: boolean

Defaults to true. While dragging an anchor, this flag ensures the editor positions the placeholder above the anchor on which it would be dropped if the user were to release the mouse button. This behaviour is new in 6.2.0 and the previous behaviour can be reinstated by setting this to false.

Version :