Transform
Transform
Constructors
new Transform()
new Transform(
store
):Transform
constructor
Parameters
• store: Store
Returns
Source
Properties
action
action:
null
|Action
Working action
Source
onAction
onAction:
TypedEvent
<Action
>
Event for action
Source
onRedo
onRedo:
TypedEvent
<Action
>
Event for redo
Source
onTransaction
onTransaction:
TypedEvent
<Transaction
>
Event for transaction
Source
onUndo
onUndo:
TypedEvent
<Action
>
Event for undo
Source
redoHistory
redoHistory:
Stack
<Action
>
Redo history.
Source
store
store:
Store
Shape store
Source
undoHistory
undoHistory:
Stack
<Action
>
Undo history.
Source
Methods
canRedo()
canRedo():
boolean
Whether redo is available
Returns
boolean
Source
canUndo()
canUndo():
boolean
Whether undo is available
Returns
boolean
Source
cancelAction()
cancelAction():
void
Cancel the action
Returns
void
Source
endAction()
endAction():
void
End the action
Returns
void
Source
mergeAction()
mergeAction():
void
Merge lastest two actions into a single action
Returns
void
Source
redo()
redo():
void
Redo
Returns
void
Source
startAction()
startAction(
name
):void
Start an action
Parameters
• name: string
Returns
void
Source
transact()
transact(
fn
):void
Execute function as a transaction
Parameters
• fn
Returns
void
Source
undo()
undo():
void
Undo
Returns
void