[]
        
(Showing Draft Content)

GC.Spread.Commands.UndoManager

Class: UndoManager

Spread.Commands.UndoManager

Table of contents

Constructors

Methods

Constructors

constructor

• new UndoManager()

Represents the undo manager.

Methods

canRedo

▸ canRedo(): boolean

Gets whether the redo operation is allowed.

Returns

boolean

true if the redo operation is allowed; otherwise, false.


canUndo

▸ canUndo(): boolean

Gets whether the undo operation is allowed.

Returns

boolean

true if the undo operation is allowed; otherwise, false.


clear

▸ clear(): void

Clears all of the undo stack and the redo stack.

Returns

void


getRedoStack

▸ getRedoStack(): any[]

Get the redo stack.

Returns

any[]

It returns an object. This must include sheetName and cmd. the type of sheetName and cmd both is string.


getUndoStack

▸ getUndoStack(): any[]

Get the undo stack.

Returns

any[]

It returns is an object. This object must include sheetName and cmd. the type of sheetName and cmd both is string.


maxSize

▸ maxSize(value?): any

Gets or sets the the undo/redo stack max size.

Parameters

Name Type Description
value? number this value should be greater or equal to 0.

Returns

any

If no value is set. return the max size of undo/redo stack. otherwise return UndoManager.


redo

▸ redo(): boolean

Redoes the last command.

Returns

boolean

true if the redo operation is successful; otherwise, false.


undo

▸ undo(): boolean

Undoes the last command.

Returns

boolean

true if the undo operation is successful; otherwise, false.