history
Classes
HistoryPlugin<Schemes>
Extends
HistoryPlugin
<Schemes
>
Type Parameters
• Schemes extends BaseSchemes
Constructors
new HistoryPlugin()
new HistoryPlugin<Schemes>(props?): HistoryPlugin<Schemes>
Parameters
• props?
History plugin properties
• props.timing?: number
Time in ms between actions to be considered as one action
Returns
HistoryPlugin
<Schemes
>
Inherited from
BaseHistoryPlugin<Schemes>.constructor
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:24
Properties
__scope
__scope: object;
parents
parents: [BaseArea<Schemes>, Root<Schemes>];
produces
produces: never;
Inherited from
BaseHistoryPlugin.__scope
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:49
canRedo
canRedo: Writable<boolean>;
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:6
canUndo
canUndo: Writable<boolean>;
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:7
isRedoing
isRedoing: boolean = false;
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:9
isUndoing
isUndoing: boolean = false;
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:8
lastMoveTime
lastMoveTime: number;
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:10
name
name: string;
Inherited from
BaseHistoryPlugin.name
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:46
parent?
optional parent: any;
Inherited from
BaseHistoryPlugin.parent
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:48
signal
signal: Signal<any>;
Inherited from
BaseHistoryPlugin.signal
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:47
timing
timing: number;
Inherited from
BaseHistoryPlugin.timing
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:18
Methods
add()
add(action): void
Adds an action to the history
Parameters
• action: Action
Action instance
Returns
void
Overrides
BaseHistoryPlugin.add
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:12
addPipe()
addPipe(middleware): void
Parameters
• middleware: Pipe
<BaseArea
<Schemes
> | Root
<Schemes
>>
Returns
void
Inherited from
BaseHistoryPlugin.addPipe
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:54
addPreset()
addPreset<T>(preset): void
Adds a preset to the history plugin
Type Parameters
• T extends Action
Parameters
• preset: Preset
<Schemes
, T
>
Preset that manages some actions, e.g. classic preset for adding/removing nodes, connections, etc.
Returns
void
Inherited from
BaseHistoryPlugin.addPreset
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:32
clear()
clear(): void
Clear history
Returns
void
Inherited from
BaseHistoryPlugin.clear
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:52
emit()
emit<C>(context): Promise<undefined>
Type Parameters
• C extends never
Parameters
• context: C
Returns
Promise
<undefined
>
Inherited from
BaseHistoryPlugin.emit
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:59
execute()
execute(action): void
Parameters
• action: Action
Returns
void
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:24
getHistorySnapshot()
getHistorySnapshot(): HistoryRecord<Action>[]
Get produced history records
Returns
HistoryRecord
<Action
>[]
History snapshot
Inherited from
BaseHistoryPlugin.getHistorySnapshot
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:42
getRecent()
getRecent(ms): HistoryRecord<Action>[]
Get recent history records produced in the last ms
milliseconds
Parameters
• ms: number
Delta time in milliseconds
Returns
HistoryRecord
<Action
>[]
History records produced in the last ms
milliseconds
Inherited from
BaseHistoryPlugin.getRecent
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:48
hasParent()
hasParent(): boolean
Returns
boolean
Inherited from
BaseHistoryPlugin.hasParent
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:60
parentScope()
parentScope()
parentScope<T, P>(): Scope<T, P>
Type Parameters
• T extends BaseArea
<Schemes
>
• P extends [Root
<Schemes
>]
Returns
Scope
<T
, P
>
Inherited from
BaseHistoryPlugin.parentScope
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:61
parentScope(type)
parentScope<T>(type): T
Type Parameters
• T
Parameters
• type: Type
<T
>
Returns
T
Inherited from
BaseHistoryPlugin.parentScope
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:62
redo()
redo(): Promise<void>
Asynchronously redoes an actions until the separated
flag is encountered or the time between the current and previous action exceeds timing
property which is 200ms by default
Returns
Promise
<void
>
Overrides
BaseHistoryPlugin.redo
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:40
separate()
separate(): void
Returns
void
Inherited from
BaseHistoryPlugin.separate
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:56
setParent()
setParent(scope): void
Parameters
• scope: Scope
<BaseArea
<Schemes
>, [Root
<Schemes
>]>
Returns
void
Inherited from
BaseHistoryPlugin.setParent
Defined in
tmp/graph-editor/node_modules/rete-history-plugin/_types/index.d.ts:27
undo()
undo(): Promise<void>
Asynchronously undoes an actions until the separated
flag is encountered or the time between the current and previous action exceeds timing
property which is 200ms by default
Returns
Promise
<void
>
Overrides
BaseHistoryPlugin.undo
Defined in
tmp/graph-editor/src/lib/graph-editor/plugins/history.ts:29
use()
use<S>(scope): object
Type Parameters
• S extends Scope
<any
, any
[]>
Parameters
• scope: NestedScope
<S
, [never
, BaseArea
<Schemes
>, Root
<Schemes
>]>
Returns
object
debug()
Type Parameters
• T extends []
Parameters
• _f
Returns
void
Inherited from
BaseHistoryPlugin.use
Defined in
tmp/graph-editor/node_modules/rete/_types/scope.d.ts:55