Skip to content

Transform

Transform

Constructors

new Transform()

new Transform(store): Transform

constructor

Parameters

store: Store

Returns

Transform

Source

core/transform.ts:125

Properties

action

action: null | Action

Working action

Source

core/transform.ts:90


onAction

onAction: TypedEvent<Action>

Event for action

Source

core/transform.ts:110


onRedo

onRedo: TypedEvent<Action>

Event for redo

Source

core/transform.ts:120


onTransaction

onTransaction: TypedEvent<Transaction>

Event for transaction

Source

core/transform.ts:105


onUndo

onUndo: TypedEvent<Action>

Event for undo

Source

core/transform.ts:115


redoHistory

redoHistory: Stack<Action>

Redo history.

Source

core/transform.ts:100


store

store: Store

Shape store

Source

core/transform.ts:85


undoHistory

undoHistory: Stack<Action>

Undo history.

Source

core/transform.ts:95

Methods

canRedo()

canRedo(): boolean

Whether redo is available

Returns

boolean

Source

core/transform.ts:213


canUndo()

canUndo(): boolean

Whether undo is available

Returns

boolean

Source

core/transform.ts:206


cancelAction()

cancelAction(): void

Cancel the action

Returns

void

Source

core/transform.ts:180


endAction()

endAction(): void

End the action

Returns

void

Source

core/transform.ts:167


mergeAction()

mergeAction(): void

Merge lastest two actions into a single action

Returns

void

Source

core/transform.ts:190


redo()

redo(): void

Redo

Returns

void

Source

core/transform.ts:234


startAction()

startAction(name): void

Start an action

Parameters

name: string

Returns

void

Source

core/transform.ts:139


transact()

transact(fn): void

Execute function as a transaction

Parameters

fn

Returns

void

Source

core/transform.ts:149


undo()

undo(): void

Undo

Returns

void

Source

core/transform.ts:220