@rendley/sdk - v1.15.19
    Preparing search index...

    Class BoundsEditSession

    A single interactive bounds-editing gesture (drag-resize / move / rotate) on one clip.

    The session translates composition-space box changes into the clip's real underlying properties (scale, crop, word-wrap width, subtitles manager state, ...) and owns the bookkeeping hosts otherwise hand-roll per clip type:

    • One undo entry per gesture: live updates record nothing; commit() records the initial → final change as a single undo group. No more setter "priming" or pause juggling.
    • Cancel: cancel() restores the captured initial state and records nothing — Escape-to-cancel in one call.
    • Fixed-point compensation: resize/rotate around "anchor" | "center" | "opposite" or an arbitrary point, with the position math derived from the clip's true anchor (bottom-anchored subtitles included) instead of an assumed center.
    • Live events: every update goes through the normal style setters, so CLIP_STYLE_UPDATED events keep flowing and host state mirrors stay in sync during the drag.

    Inputs are ABSOLUTE against the session's captured initial state (target box width/height, target rotation), not deltas — repeated calls with the same input are idempotent.

    Obtain via Clip.beginBoundsEdit. A session must be finished with exactly one of commit() or cancel(); beginning a new session on the same clip cancels an unfinished one, and destroying the clip cancels it too. Undo pausing is scoped to each synchronous update (never held between calls), so even an abandoned session leaves no global undo state behind — only its uncommitted property values.

    Index

    Constructors

    Methods

    • Aborts the gesture: restores the captured initial state and records nothing.

      Returns void

    • Finishes the gesture, recording the whole initial → final change as ONE undo group. The final state is re-applied through the normal setters (with their own undo payloads and events), so undo/redo behave exactly as if the change had been a single direct edit.

      Returns void

    • Returns boolean

    • Moves the clip's anchor point (position) to the given composition-space coordinates.

      Parameters

      • x: number
      • y: number

      Returns void

    • Resizes the clip's geometry box to the target size (composition px, absolute against the session's initial state). Side edges change only their own axis; the other target is ignored.

      Parameters

      • edge: BoundsEdge

        Handle being dragged.

      • targetWidth: number

        Target box width, composition px.

      • targetHeight: number

        Target box height, composition px.

      • Optionaloptions: BoundsResizeOptions

        mode (default "auto" — resolves via capabilities) and fixed (default "anchor" — never implicitly writes position).

      Returns void

    • Sets the clip rotation (radians, absolute). With a non-"anchor" fixed point, position orbits so that point stays stationary.

      Parameters

      Returns void