<< Click to Display Table of Contents >>

 

new sg.UndoManager(options)

 

 

Description

create UndoManager object.

 

Position

UndoManager.js

 

Parameters

 

Parameter

Type

Description

options

Object

The option of UndoManager.

Name

Type

Description

maxOperation

Number

maxOperation represents the max features to operate undo action.

 

 

Properties

 

Properties

Type

Description

canRedo

Boolean

indicate whether users can redo or not.

canUndo

Boolean

indicate whether users can undo or not.

 

 

Methods

 

Methods

Type

Description

add(operation)

OperationBase

add an operation.

Name

Type

Description

operation

OperationBase

The operation

clearRedo()


clear all redo operation.

clearUndo()


clear all undo operation

destroy()


destroy operation manager

get(id)

Number

return the specified operation by its id

Name

Type

Description

id

Number

id

peekRedo()


return the next redo operation.

peekUndo()


return the next undo operation.

redo()


redo an operation.

remove(id)

Number

remove the specified operation.

Name

Type

Description

id

Number

id

undo()


undo an operation

 

 

Events

 

Event

Description

add

Called when add an operation

change

Called when add or delete an operation

redo

Called when perform redo.

undo

Called when perform undo.

 

 


©2015 Supergeo Technologies Inc.