Class: LocalUndoRedoService
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:161
This UndoRedoService is local.
Extends
Extended by
Implements
Constructors
new LocalUndoRedoService()
new LocalUndoRedoService(
_univerInstanceService,
_commandService,
_contextService): LocalUndoRedoService
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:171
Parameters
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
_commandService | ICommandService |
_contextService | IContextService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_commandService | readonly | ICommandService | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:173 |
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_redoStacks | readonly | Map <string , IUndoRedoItem []> | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:167 |
_undoRedoStatus$ | readonly | BehaviorSubject <{ redos : number ; undos : number ; }> | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:163 |
_undoStacks | readonly | Map <string , IUndoRedoItem []> | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:166 |
_univerInstanceService | readonly | IUniverInstanceService | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:172 |
undoRedoStatus$ | readonly | Observable <IUndoRedoStatus > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:162 |
Methods
__tempBatchingUndoRedo()
__tempBatchingUndoRedo(unitId): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:274
Batch undo redo elements into a single IUndoRedoItem
util the returned IDisposable
is called.
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
a disposable to cancel batching undo redo elements
Deprecated
This is a temporary solution. We are going to refactor the undo redo service shortly.
Implementation of
IUndoRedoService
.__tempBatchingUndoRedo
_getRedoStack()
Call Signature
protected _getRedoStack(unitId): null | IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:306
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| IUndoRedoItem
[]
Call Signature
protected _getRedoStack(unitId, createAsNeeded): IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:307
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
_getRedoStackForFocused()
protected _getRedoStackForFocused(): IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:328
Returns
_getUndoStack()
Call Signature
protected _getUndoStack(unitId): null | IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:294
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| IUndoRedoItem
[]
Call Signature
protected _getUndoStack(unitId, createAsNeeded): IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:295
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
_getUndoStackForFocused()
protected _getUndoStackForFocused(): IUndoRedoItem[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:318
Returns
_updateStatus()
protected _updateStatus(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:283
Returns
void
clearUndoRedo()
clearUndoRedo(unitID): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:220
Parameters
Parameter | Type |
---|---|
unitID | string |
Returns
void
Implementation of
IUndoRedoService
.clearUndoRedo
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
pitchTopRedoElement()
pitchTopRedoElement(): Nullable<IUndoRedoItem>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:239
Pitch the top undo element of the currently focused Univer document instance.
Returns
Implementation of
IUndoRedoService
.pitchTopRedoElement
pitchTopUndoElement()
pitchTopUndoElement(): Nullable<IUndoRedoItem>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:234
Pitch the top redo element of the currently focused Univer document instance.
Returns
Implementation of
IUndoRedoService
.pitchTopUndoElement
popRedoToUndo()
popRedoToUndo(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:264
Returns
void
Implementation of
IUndoRedoService
.popRedoToUndo
popUndoToRedo()
popUndoToRedo(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:254
Returns
void
Implementation of
IUndoRedoService
.popUndoToRedo
pushUndoRedo()
pushUndoRedo(item): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:187
Parameters
Parameter | Type |
---|---|
item | IUndoRedoItem |
Returns
void