History

ceramic.Entitytracker.History (Class)
Implements: ceramic.Component

Instance Members

entity: Model

stepSyncDelay: Float

The delay until a model serialization synchronization is triggered after calling step(). Useful to prevent too many steps being recorded.


maxSteps: Int

If provided, number of available steps will be limited to this value, meaning older steps will be removed and not recoverable if reaching the limit. Default is: store as many steps as possible, no limit (except available memory?)


initializerName: String

clearPreviousStepsOutsideLimit(maxSteps: Int): Void

Manually clear previous steps outside the given limit

Name Type
maxSteps Int

bindAsComponent(): Void

step(): Void

Record a step in the undo stack


disable(): Void

enable(): Void

undo(): Void

Undo last step, if any


redo(): Void

Redo last undone step, if any


new(): Void

Private Members

stepPending: Bool

currentData: StringBuf

steps: Array<String>

currentStep: Int

ignoreSteps: Int

canScheduleImmediateStep: Bool

emitUndo(): Void

undo event


emitRedo(): Void

redo event


scheduledStep(): Void

clearDelayAllowImmediateStep(): Void

bindSerializer(serializer: SerializeModel): Void
Name Type
serializer SerializeModel

recordStepIfNeeded(): Void

applyCurrentStep(): Void

setEntity(entity: ceramic.Entity): Void
Name Type
entity ceramic.Entity

getEntity(): ceramic.Entity
Returns
ceramic.Entity

Metadata

Name Parameters
:build ceramic.macros.ComponentMacro.build()
:autoBuild ceramic.macros.ComponentMacro.build()
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()