libavoid-js
    Preparing search index...

    Interface JunctionRef

    A point where several connectors meet. Created by router.addJunction.

    interface JunctionRef {
        delete(): void;
        "[dispose]"(): void;
        isDeleted(): boolean;
        isAliasOf(other: Handle): boolean;
        id(): number;
        polygon(): Point[];
        position(): Point;
        routingBox(): Rect;
        addPin(pin: JunctionPinOptions): ShapeConnectionPin;
        setPositionFixed(fixed: boolean): void;
        positionFixed(): boolean;
        recommendedPosition(): Point;
    }

    Hierarchy (View Summary)

    Index
    • For the router: frees it and everything added to it. For other objects: removes the object. Shapes, junctions and connectors are removed through their router, like router.deleteShape(shape), with the same restrictions; a pin is removed from its shape or junction immediately. Everything the object owns goes with it. Using the object afterwards throws.

      Returns void

    • True once the object was freed, whether by its own delete() or by deleting its owner (e.g. a pin's shape, or the router).

      Returns boolean

    • The unique id: options.id given when it was added, or one assigned by the router.

      Returns number

    • Sets whether the junction's position is fixed. If it is not (the default), the router may suggest a better position while improving hyperedge routes; see recommendedPosition(). Takes effect at the next processTransaction().

      Parameters

      • fixed: boolean

      Returns void

      libavoid: ignored for hyperedge improvement when the improveHyperedgeRoutesMovingAddingAndDeletingJunctions option is on and keeping the junction would give a confusing topology (e.g. two overlapping junctions joined by a zero-length connector).

    • Whether the junction's position is fixed; see setPositionFixed().

      Returns boolean

    • The position the router suggests for the junction after improving the routes of its connectors, which it does when the improveHyperedgeRoutesMovingJunctions option is on (the default). The junction itself is not moved: use router.moveJunction to apply the suggestion. Meaningful after processTransaction().

      Returns Point