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

    Class IIResizeManager

    Hierarchy (View Summary)

    Index
    • 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

    • Applies a matrix transform locally (model + redraw) without touching the backend or history. Used by InteractiveInkCanvas's undo/redo replay dispatcher, which sends its own consolidated backend message separately.

      Parameters

      Returns void

    • Parameters

      Returns { scaleX: number; scaleY: number }

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

      Returns void

    • Parameters

      Returns Promise<void>

    • Element ids of the ghost previews attached to the given selection's math blocks — for live CSS-transform following while a translate/resize/rotate drag is in progress.

      Parameters

      Returns string[]

    • 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.
      }
    • The live gesture, previewed on the standalone decorators carried by symbols.

      Only those whose every target is in symbols: they are the ones the commit moves by the same matrix (see updateDecoratorsForTargets), so previewing them any other way would show a decoration that jumps on release. A decorator only partly moved has its box refitted at commit instead, which a matrix cannot preview.

      Parameters

      Returns void

    • The same, for an element with no symbol behind it — the interact-elements group, or a math ghost stroke. Nothing is composed because nothing is stored: these are drawn in document coordinates already.

      Note both preview methods write a full matrix(...), carrying their own centre. The transform-origin attribute this class used to set cannot serve here: it applies to the whole transform list, so it would displace the stored matrix, which brings its own centre.

      Parameters

      Returns void

    • The gesture's matrix, previewed on top of the one the symbol already carries.

      The live part multiplies onto the stored one rather than replacing it, so the SVG transform list reads outside-in: the symbol sits where its own matrix puts it, and the gesture moves it from there — the same order the commit will apply. Writing the live transform alone is what made an already-moved symbol snap back to its raw coordinates for the length of a drag and jump into place on release (IIC-1999). Before this epic only a rotated typeset carried a baked transform; now every moved symbol does, so the same overwrite would affect all of them.

      The stored matrix is untouched here. This is a preview: applyAndDraw is what settles it.

      Parameters

      Returns void

    • Records a transform as the before/after pair updated wants, resolving "after" from the document by id rather than from the caller.

      By id, because a transform commits a draft: the object the caller holds is the pre-transform snapshot, and reading the moved value off it would record no change at all. Resolving both sides here also keeps the two lists the same length — a symbol the document no longer holds is dropped from both rather than shifting every pair after it.

      Call after applyAndDraw, with the snapshots taken before it.

      Parameters

      Returns void

    • Gradient-followed strokes were reshaped non-uniformly by the connector — their points did not all move by the same delta — so the backend cannot be asked to apply this transform to them. Their full new content has to be sent instead. Returns one replaceStrokes call per such stroke, to be spread into the transform's own Promise.all.

      Parameters

      Returns Promise<void>[]

    • Live model symbols for the pre-convert edge strokes that rigidly follow a transform (see IIConnectorManager), minus any already present in alreadyIncluded. They are transformed outside applyAndDraw, so history entries and backend transform messages must list them explicitly or undo and the server's ink both drift out of sync.

      Parameters

      • followedIds: string[]
      • alreadyIncluded: TSymbol[]

      Returns TSymbol[]

    • Parameters

      • target: Element

      Returns SVGGElement

    • Parameters

      • target: Element
      • origin: TPoint

      Returns void

    boundingBox: TBox

    The Interactive Ink Canvas instance

    direction: ResizeDirection
    interactElementsGroup?: SVGElement
    keepRatio: boolean = false
    logger: Logger

    Logger instance for this manager Automatically uses LoggerCategory.MANAGER

    managerName: string = "IIResizeManager"

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

    "IITypesetManager", "IIMathManager"
    
    transformOrigin: TPoint