sesaparcours
    Preparing search index...

    Type Parameters

    • E = any

    Hierarchy (View Summary)

    Index

    Properties

    _defaultType: ComponentTypeDescriptor
    _hover: boolean
    _typeCache: {}
    _types: Set<string>
    clone: () => Component
    connector: AbstractConnector
    cost: number

    Connection's cost.

    cssClass: string
    data: Record<string, any>
    defaultLabelLocation: number
    deleted: boolean
    detachable: boolean

    Whether or not this connection is detachable

    directed: boolean

    Whether or not the connection is directed.

    endpointHoverStyle: PaintStyle
    endpointHoverStyles: [PaintStyle, PaintStyle]
    endpoints: [Endpoint<E>, Endpoint<E>]

    Source and target endpoints.

    endpointSpec: EndpointSpec
    endpointsSpec: [EndpointSpec, EndpointSpec]
    endpointStyle: PaintStyle
    endpointStyles: [PaintStyle, PaintStyle]
    events: any
    h: number
    hoverClass: string
    hoverPaintStyle: PaintStyle
    id: string
    instance: JsPlumbInstance
    lastPaintedAt: string
    overlayPlacements: Record<string, Extents>
    overlayPositions: Record<string, PointXY>
    overlays: Record<string, Overlay>
    paintStyle: PaintStyle
    paintStyleInUse: PaintStyle
    params: Record<string, any>
    previousConnection: Connection
    reattach: boolean

    Whether or not this connection should be reattached if it were detached via the mouse

    scope: string
    segment: number
    source: E

    The element that is the source of the connection

    sourceId: string

    The id of the source of the connection

    target: E

    The element that is the target of the connection

    targetId: string

    The id of the target of the connection

    typeId: string
    uuids: [string, string]

    UUIDs of the endpoints. If this is not specifically provided in the constructor of the connection it will be null.

    visible: boolean
    w: number
    x: number
    y: number
    type: string

    Methods

    • Adds the given class to the UI elements being used to represent this connection's connector, and optionally to the UI elements representing the connection's endpoints.

      Parameters

      • c: string

        class to add

      • Optionalcascade: boolean

        If true, also add the class to the connection's endpoints.

      Returns void

    • Bind an event listener. This method can be used with a type parameter by call sites; although it's not necessary it can be helpful to use this to ensure you've thought about what the payload to your event handler is going to be.

      Type Parameters

      • T = any

      Parameters

      • event: string | String[]

        Name of the event(s) to bind to.

      • listener: (a: T, e?: any) => any

        Function to bind to the given event(s)

      • OptionalinsertAtStart: boolean

        Whether or not to insert this listener at the head of the listener queue. Defaults to false.

      Returns EventGenerator

    • Fire the named event.

      Type Parameters

      • T

      Parameters

      • event: string

        Event to fire

      • Optionalvalue: T

        Value to pass to event handlers

      • OptionaloriginalEvent: Event

        Optional original event that caused this event to be fired.

      Returns any

    • Returns a space-separated list of the current classes assigned to this component.

      Returns string

    • Gets any backing data stored against the given component.

      Returns Record<string, any>

    • Returns string

    • Returns string

    • Return this component's label, if one is set.

      Returns string

    • Gets all listeners for the given named event.

      Parameters

      • forEvent: string

      Returns any[]

    • Get the Overlay with the given ID. You can optionally provide a type parameter for this method in order to get a typed return value (such as LabelOverlay, ArrowOverlay, etc), since some overlays have methods that others do not.

      Type Parameters

      Parameters

      • id: string

        ID of the overlay to retrieve.

      Returns T

    • Gets all the overlays registered on this component.

      Returns Record<string, Overlay>

    • Returns string

    • Returns [string, string]

    • Returns { x: number; y: number }

    • Hide the overlay with the given id.

      Parameters

      • id: string

      Returns void

    • Hide all overlays, or a specific set of overlays.

      Parameters

      • ...ids: string[]

        optional list of ids to hide.

      Returns void

    • Parameters

      Returns boolean

    • Returns boolean

    • Returns whether not event firing is currently suspended

      Returns boolean

    • Parameters

      Returns Endpoint

    • Merges the given backing data into any current backing data.

      Parameters

      • d: any

      Returns void

    • Remove all overlays from this component.

      Returns void

    • Removes the given class from the UI elements being used to represent this connection's connector, and optionally from the UI elements representing the connection's endpoints.

      Parameters

      • c: string

        class to remove

      • Optionalcascade: boolean

        If true, also remove the class from the connection's endpoints.

      Returns void

    • Remove the given set of overlays, specified by their ids.

      Parameters

      • ...overlays: string[]

      Returns void

    • Replace the Endpoint at the given index with a new Endpoint. This is used by the Toolkit edition, if changes to an edge type cause a change in Endpoint.

      Parameters

      • idx: number

        0 for source, 1 for target

      • endpointDef: EndpointSpec

        Spec for the new Endpoint.

      Returns void

    • Sets backing data stored against the given component, overwriting any current value.

      Parameters

      • d: any

      Returns void

    • Parameters

      • detachable: boolean

      Returns void

    • Set this component's label.

      Parameters

      • l: string | Function | LabelOverlay

        Either some text, or a function which returns some text, or an existing label overlay.

      Returns void

    • Parameters

      • reattach: boolean

      Returns void

    • Sets whether not event firing is currently suspended

      Parameters

      • val: boolean

      Returns void

    • Sets the visible state of the connection.

      Parameters

      • v: boolean

      Returns void

    • Show a specific overlay (set it to be visible)

      Parameters

      • id: string

      Returns void

    • Show all overlays, or a specific set of overlays.

      Parameters

      • ...ids: string[]

        optional list of ids to show.

      Returns void

    • Run the given function without firing any events.

      Parameters

      Returns void

    • Unbind the given event listener, or all listeners. If you call this method with no arguments then all event listeners are unbound.

      Parameters

      • OptionaleventOrListener: string | Function

        Either an event name, or an event handler function

      • Optionallistener: Function

        If eventOrListener is defined, this is the event handler to unbind.

      Returns EventGenerator