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

    Class IIMathComputationSubManager

    Sub-manager responsible for tracking math block computations and running numerical solver operations

    Hierarchy (View Summary)

    Index

    The Interactive Ink Canvas instance

    DEFAULT_CONFIG: TMathComputationConfig = ...
    logger: Logger

    Logger instance for this manager Automatically uses LoggerCategory.MANAGER

    managerName: string = "IIMathComputationSubManager"

    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

    • Moves and redraws a block's ghost strokes in place, so they passively follow a translate/resize/rotate of the block's source strokes instead of visually detaching.

      Parameters

      Returns void

    • Parameters

      Returns string

    • Returns void

    • Returns void

    • Returns Promise<void>

    • Parameters

      • jiixBlockId: string

      Returns void

    • Parameters

      • jiixBlockId: string

      Returns Promise<void>

    • Returns Promise<void>

    • Parameters

      Returns Promise<
          {
              addedStrokesCount: number;
              result: TJIIXMathElement;
              value?: number;
              wasRecomputed: boolean;
          },
      >

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

      Returns void

    • Parameters

      Returns { F?: number[]; T?: number[]; X: number[]; Y: number[] }[]

    • Parameters

      Returns { F?: number[]; T?: number[]; X: number[]; Y: number[] }[]

    • Clear then recompute numerical results for the given math blocks, or all blocks if none given.

      Parameters

      • OptionaljiixBlockIds: string[]

      Returns Promise<void>

    • Merged bounds of a block's ghost strokes, for inclusion in the selection rectangle while the block has no frozen draw result yet. Undefined if the block has no ghost.

      Parameters

      • jiixBlockId: string

      Returns TBox | undefined

    • Element ids of a block's ghost strokes, for live CSS-transform following during a drag.

      Parameters

      • jiixBlockId: string

      Returns string[]

    • Parameters

      • jiixBlockId: string

      Returns TMathBlockComputation | undefined

    • Parameters

      • jiixBlockId: string

      Returns string[] | undefined

    • Parameters

      • jiixBlockId: string

      Returns boolean

    • Parameters

      • jiixBlockId: string

      Returns boolean

    • Parameters

      • jiixBlockId: string

      Returns boolean

    • 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.
      }
    • Parameters

      • jiixBlockId: string

      Returns void

    • Parameters

      • jiixBlockId: string
      • result: unknown

      Returns void

    • Parameters

      • jiixBlockId: string
      • solverOutputStrokeIds: string[]

      Returns void

    • Parameters

      • solverOutputStrokeIds: string[]

      Returns void