Documentation - v20.0.0-dev
    Preparing search index...

    Class ObjectStateController<TObject, TState>

    Recomputes and applies an object's final state by folding all of its active partial states over the initial state captured at construction, in insertion order. A partial state with restore: true resets the accumulator to the initial state before continuing. See ObjectStateHistory for how partial states get registered.

    Only the fields whose final value changed since the last one applied are written to the object: a visibility state on many objects moves and recolours none of them.

    Type Parameters

    Index

    Constructors

    Properties

    _appliedState: ObjectState

    The final state last applied to the object: its initial state until one is applied.

    _initialState: ObjectState
    _object: TObject
    _stateIds: Set<number> = ...

    Methods

    • Writes to the object the fields of state that differ from those of appliedState.

      Parameters

      Returns void

    • Parameters

      Returns void

    • Returns ObjectState

    • Parameters

      • id: number

      Returns void

    • Parameters

      • id: number

      Returns boolean

    • Parameters

      • id: number

      Returns boolean