iink-ts - v4.0.0
    Preparing search index...

    Class IIConnectorManager

    Manages anchored edges — edges whose endpoints are bound to other symbols. When an anchored symbol moves, updateAnchoredEdges recomputes the corresponding edge endpoints from their stored normalized anchor coordinates.

    Hierarchy (View Summary)

    Index

    The Interactive Ink Canvas instance

    logger: Logger

    Logger instance for this manager Automatically uses LoggerCategory.MANAGER

    managerName: string = "IIConnectorManager"

    Name of the manager for logging purposes Must be overridden in concrete classes

    "IITypesetManager", "IIMathManager"
    
    • get client(): WebSocketClient

      Get the client from the canvas Convenience getter to avoid accessing canvas.client everywhere

      Returns WebSocketClient

    • get model(): IIModel

      Get the model from the canvas Convenience getter to avoid accessing canvas.model everywhere

      Returns IIModel

    • get renderer(): SVGRenderer

      Get the renderer from the canvas Convenience getter to avoid accessing canvas.renderer everywhere

      Returns SVGRenderer

    • Assign or clear the start/end anchor on a Line or PolyLine edge endpoint. When a target shape is found, snaps the endpoint to the shape center and computes entryPoint (intersection with shape border) for split rendering. Called after the user releases an edge endpoint drag.

      Parameters

      Returns void

    • Clear anchors from any edges in symbols that are being directly translated. An anchored edge that the user explicitly moves becomes a free edge.

      Parameters

      Returns void

    • Remove the anchor snap hint from the interaction layer.

      Returns void

    • Destroy the manager and cleanup resources Calls the onDestroy hook if defined

      Returns void

    • Visually reposition anchored edge endpoints by applying matrix to the stored anchor point (original position) — no model update. Call from transform continue() for real-time edge following.

      Parameters

      Returns void

    • Find the first non-edge symbol whose bounds contain the given point. excludeId prevents matching the edge being dragged.

      Parameters

      • point: TPoint
      • excludeId: string

      Returns TSymbol | undefined

    • Lifecycle hook called when the manager is being destroyed Override in subclasses to cleanup resources

      Returns void

      protected onDestroy(): void {
      this.logger.info(`${this.managerName} destroyed`)
      // Remove event listeners, clear intervals, etc.
      }
    • Lifecycle hook called after manager initialization Override in subclasses if needed

      This is called at the end of the constructor, allowing subclasses to perform initialization that requires access to this.managerName or other properties set in the subclass constructor.

      Returns void

      protected onInit(): void {
      this.logger.info(`${this.managerName} initialized`)
      // Setup event listeners, etc.
      }
    • Draw a dashed highlight rect around a symbol's bounds to indicate an active anchor snap target. Clears any previously shown hint first.

      Parameters

      • point: TPoint
      • excludeId: string

      Returns TSymbol | undefined

    • Recompute endpoints of all edges anchored to any of the given symbol IDs. Called by transform managers after translate / resize / rotate. Pass matrix and preTransformBoundsById when called from rotation so that anchor resolution uses the pre-transform AABB rather than the post-rotation AABB.

      Parameters

      • symbolIds: string[]
      • Optionalmatrix: MatrixTransform
      • OptionalpreTransformBoundsById: Map<string, TOBB>

      Returns void