@univerjs/core v0.4.2 • Docs
Class: LocalUndoRedoService
This UndoRedoService is local.
Extends
Implements
Constructors
new LocalUndoRedoService()
new LocalUndoRedoService(
_univerInstanceService,
_commandService,
_contextService): LocalUndoRedoService
Parameters
Parameter | Type |
---|---|
_univerInstanceService | IUniverInstanceService |
_commandService | ICommandService |
_contextService | IContextService |
Returns
Overrides
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:168 (opens in a new tab)
Properties
Methods
__tempBatchingUndoRedo()
__tempBatchingUndoRedo(unitId): IDisposable
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
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:271 (opens in a new tab)
_getRedoStack()
_getRedoStack(unitId)
protected _getRedoStack(unitId): null | IUndoRedoItem[]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| IUndoRedoItem
[]
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:303 (opens in a new tab)
_getRedoStack(unitId, createAsNeeded)
protected _getRedoStack(unitId, createAsNeeded): IUndoRedoItem[]
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:304 (opens in a new tab)
_getRedoStackForFocused()
protected _getRedoStackForFocused(): IUndoRedoItem[]
Returns
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:325 (opens in a new tab)
_getUndoStack()
_getUndoStack(unitId)
protected _getUndoStack(unitId): null | IUndoRedoItem[]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
null
| IUndoRedoItem
[]
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:291 (opens in a new tab)
_getUndoStack(unitId, createAsNeeded)
protected _getUndoStack(unitId, createAsNeeded): IUndoRedoItem[]
Parameters
Parameter | Type |
---|---|
unitId | string |
createAsNeeded | true |
Returns
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:292 (opens in a new tab)
_getUndoStackForFocused()
protected _getUndoStackForFocused(): IUndoRedoItem[]
Returns
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:315 (opens in a new tab)
_updateStatus()
protected _updateStatus(): void
Returns
void
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:280 (opens in a new tab)
clearUndoRedo()
clearUndoRedo(unitID): void
Parameters
Parameter | Type |
---|---|
unitID | string |
Returns
void
Implementation of
IUndoRedoService
.clearUndoRedo
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:217 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
pitchTopRedoElement()
pitchTopRedoElement(): Nullable<IUndoRedoItem>
Pitch the top undo element of the currently focused Univer document instance.
Returns
Implementation of
IUndoRedoService
.pitchTopRedoElement
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:236 (opens in a new tab)
pitchTopUndoElement()
pitchTopUndoElement(): Nullable<IUndoRedoItem>
Pitch the top redo element of the currently focused Univer document instance.
Returns
Implementation of
IUndoRedoService
.pitchTopUndoElement
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:231 (opens in a new tab)
popRedoToUndo()
popRedoToUndo(): void
Returns
void
Implementation of
IUndoRedoService
.popRedoToUndo
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:261 (opens in a new tab)
popUndoToRedo()
popUndoToRedo(): void
Returns
void
Implementation of
IUndoRedoService
.popUndoToRedo
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:251 (opens in a new tab)
pushUndoRedo()
pushUndoRedo(item): void
Parameters
Parameter | Type |
---|---|
item | IUndoRedoItem |
Returns
void
Implementation of
Defined in
submodules/univer/packages/core/src/services/undoredo/undoredo.service.ts:184 (opens in a new tab)