File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed
packages/plugin-history/src Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1
1
export * from './add-object-cmd' ;
2
2
export * from './remove-object-cmd' ;
3
+ export * from './modified-object-cmd' ;
Original file line number Diff line number Diff line change
1
+ import { App } from '@pictode/core' ;
2
+
3
+ import { Cmd } from '../types' ;
4
+
5
+ import { BaseCmd } from './base' ;
6
+
7
+ export class ModifiedObjectCmd extends BaseCmd < Cmd . ModifiedObjectOptions > {
8
+ constructor ( app : App , options : Cmd . ModifiedObjectOptions ) {
9
+ super ( app , options ) ;
10
+ }
11
+
12
+ public execute ( ) : void {
13
+ if ( ! this . app || ! this . options ?. newObject ) {
14
+ return ;
15
+ }
16
+ }
17
+
18
+ public undo ( ) : void {
19
+ throw new Error ( 'Method not implemented.' ) ;
20
+ }
21
+ }
22
+
23
+ export default ModifiedObjectCmd ;
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { Cmd } from '../types';
4
4
5
5
import { BaseCmd } from './base' ;
6
6
7
- export class RemoveObjectCmd extends BaseCmd < Cmd . RemoveObjectCmd > {
8
- constructor ( app : App , options : Cmd . RemoveObjectCmd ) {
7
+ export class RemoveObjectCmd extends BaseCmd < Cmd . RemoveObjectOptions > {
8
+ constructor ( app : App , options : Cmd . RemoveObjectOptions ) {
9
9
super ( app , options ) ;
10
10
}
11
11
Original file line number Diff line number Diff line change @@ -42,9 +42,14 @@ export namespace Cmd {
42
42
object : BaseFabricObject ;
43
43
}
44
44
45
- export interface RemoveObjectCmd {
45
+ export interface RemoveObjectOptions {
46
46
object : BaseFabricObject ;
47
47
}
48
+
49
+ export interface ModifiedObjectOptions {
50
+ oldObject : BaseFabricObject ;
51
+ newObject : BaseFabricObject ;
52
+ }
48
53
}
49
54
50
55
export interface Options {
You can’t perform that action at this time.
0 commit comments