Class: OperationHistory

Kekule. OperationHistory

new OperationHistory()

Source:

Methods

canRedo() → {Bool}

Check if a redo action can be taken.
Source:
Returns:
Type
Bool

canUndo() → {Bool}

Check if an undo action can be taken.
Source:
Returns:
Type
Bool

clear()

Clear the history list.
Source:

getCurrOperation() → {Kekule.Operation}

Get current operation in list.
Source:
Returns:
Type
Kekule.Operation

getOperationAt(index) → {Kekule.Operation}

Return child operation at index.
Parameters:
Name Type Description
index Int
Source:
Returns:
Type
Kekule.Operation

getOperationCount() → {Int}

Returns count of operations in history.
Source:
Returns:
Type
Int

pop() → {Kekule.Operation}

Popup topmost operation out of list.
Source:
Returns:
Type
Kekule.Operation

push(operation)

Add new operation to history list.
Parameters:
Name Type Description
operation Kekule.Operation
Source:

redo() → {Kekule.Operation}

Redo a rollbacked operation.
Source:
Returns:
Operation redone.
Type
Kekule.Operation

undo() → {Kekule.Operation}

Undo current operation.
Source:
Returns:
Operation undone.
Type
Kekule.Operation

undoAll()

Undo all operations.
Source:

unpop() → {Kekule.Operation}

Rollback a pop action.
Source:
Returns:
Type
Kekule.Operation

Events

clear

Invoked when the operation list is cleared. event param of it has one fields: {currOperIndex: Int}
Source:

operChange

Invoked when the items in operation history has some changes.
Source:

pop

Invoked when the an operation is popped from history. event param of it has two fields: {operation: Kekule.Operation, currOperIndex: Int}
Source:

push

Invoked when the an operation is pushed into history. event param of it has two fields: {operation: Kekule.Operation, currOperIndex: Int}
Source:

redo

Invoked when one operation is redone. event param of it has one fields: {operation: Kekule.Operation, currOperIndex: Int}
Source:

undo

Invoked when one operation is undone. event param of it has two fields: {operation: Kekule.Operation, currOperIndex: Int}
Source: