SheetXL - v1.0.2
    Preparing search index...

    Interface IConnectorFormat

    A connector's two ends, each glued to a connection site of another shape or free.

    Gluing an end places the connector so the end lies on the site, and the connector follows the shape from then on: a move, turn, mirror or resize of the shape moves the connector in the same undoable step. A shape whose geometry has not evaluated yet is followed once it has. Sites are numbered from 0, as IGeometry.forEachConnection visits them.

    interface IConnectorFormat {
        endConnect(
            movable: IMovable,
            site: number,
            options?: ITransaction.OperationOptions,
        ): void;
        endDisconnect(options?: ITransaction.OperationOptions): void;
        getConnectorType(): IShape.ConnectorType;
        getEndConnectedMovable(): IMovable | null;
        getEndConnectionSite(): number | null;
        getEndPoints(
            placement?: IMovable.Placement,
        ): { end: Point; start: Point } | null;
        getGluedRoute(
            placements?: (movable: IMovable) => PlacementPreview | null,
        ): ConnectorRoute | null;
        getStartConnectedMovable(): IMovable | null;
        getStartConnectionSite(): number | null;
        isEndConnected(): boolean;
        isStartConnected(): boolean;
        placeEnds(start: Point, end: Point): IMovable.Placement;
        startConnect(
            movable: IMovable,
            site: number,
            options?: ITransaction.OperationOptions,
        ): void;
        startDisconnect(options?: ITransaction.OperationOptions): void;
    }
    Index
    • The movable the end is glued to; null when it is free or the movable is gone.

      Returns IMovable | null

    • The site the end is glued to; null when it is free.

      Returns number | null

    • Where the connector's ends are on the sheet: its path runs from its frame's top-left to its bottom-right, and the frame's flips and turn put those corners where they are.

      Parameters

      • Optionalplacement: IMovable.Placement

        A placement to answer for; the connector's own when omitted.

      Returns { end: Point; start: Point } | null

      null for a connector with no placement.

    • Where the connector goes with each glued end on its shape's site, and the route it takes: what the sheet writes when a movable it is glued to changes, for a drawing layer to preview.

      Parameters

      • Optionalplacements: (movable: IMovable) => PlacementPreview | null

        Where each movable is, as a gesture previews it; the model's when omitted.

      Returns ConnectorRoute | null

      null when no end can be placed: none is glued, or its target has not answered its sites.

      An elbow or curve is routed between its ends as Excel routes it: the preset (from an L to five legs) and its adjust values follow where the shapes are. Glued at one end, the connector moves whole with a shape that only moves; any other change keeps the free end where it is.

    • The movable the start is glued to; null when it is free or the movable is gone.

      Returns IMovable | null

    • The site the start is glued to; null when it is free.

      Returns number | null

    • Whether the end of the connector is glued to a movable.

      Returns boolean

    • Whether the start of the connector is glued to a movable.

      Returns boolean

    • The placement that runs the connector from start to end, keeping its turn: the frame is the box of the two points in its own axes, mirrored on each axis the end lies before the start on. Nothing is written.

      Parameters

      • start: Point
      • end: Point

      Returns IMovable.Placement