File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1- import { Subscribable } from './subscribable'
21import * as PACKAGE from '../../package.json'
32import { Variant } from '../variants'
3+ import { Subscribable } from './subscribable'
44
55export class PluginEvent < EventData = void > extends Subscribable < EventData > {
66 protected static events : Record < string , PluginEvent < any > > = { }
@@ -43,6 +43,9 @@ export const events = {
4343 UNSELECT_KEYFRAME : new PluginEvent ( 'unselectKeyframe' ) ,
4444
4545 UPDATE_SELECTION : new PluginEvent ( 'updateSelection' ) ,
46+
47+ UNDO : new PluginEvent < UndoEntry > ( 'undo' ) ,
48+ REDO : new PluginEvent < UndoEntry > ( 'redo' ) ,
4649}
4750
4851function injectionHandler ( ) {
@@ -69,3 +72,5 @@ Blockbench.on<EventName>('unselect_project', ({ project }: { project: ModelProje
6972 events . UNSELECT_PROJECT . dispatch ( project )
7073} )
7174Blockbench . on < EventName > ( 'update_selection' , ( ) => events . UPDATE_SELECTION . dispatch ( ) )
75+ Blockbench . on < EventName > ( 'undo' , ( entry : UndoEntry ) => events . UNDO . dispatch ( entry ) )
76+ Blockbench . on < EventName > ( 'redo' , ( entry : UndoEntry ) => events . REDO . dispatch ( entry ) )
You can’t perform that action at this time.
0 commit comments