libavoid-js
    Preparing search index...

    Interface ShapeRef

    A shape (rectangle or polygon) that connectors are routed around. Created by router.addShape.

    interface ShapeRef {
        delete(): void;
        "[dispose]"(): void;
        isDeleted(): boolean;
        isAliasOf(other: Handle): boolean;
        id(): number;
        polygon(): Point[];
        position(): Point;
        routingBox(): Rect;
        addPin(pin: ShapePinOptions): ShapeConnectionPin;
    }

    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