@@ -2,7 +2,6 @@ import { Vector } from '../core/vector';
2
2
import { DesignerContext } from '../designer-context' ;
3
3
import { DesignerState } from '../designer-state' ;
4
4
import { StepComponent } from '../workspace/component' ;
5
- import { ComponentContext } from '../workspace/component-context' ;
6
5
import { Behavior } from './behavior' ;
7
6
import { DragStepBehavior } from './drag-step-behavior' ;
8
7
import { MoveViewPortBehavior } from './move-view-port-behavior' ;
@@ -11,17 +10,15 @@ export class SelectStepBehavior implements Behavior {
11
10
public static create (
12
11
pressedStepComponent : StepComponent ,
13
12
isDragDisabled : boolean ,
14
- designerContext : DesignerContext ,
15
- componentContext : ComponentContext
13
+ designerContext : DesignerContext
16
14
) : SelectStepBehavior {
17
- return new SelectStepBehavior ( pressedStepComponent , isDragDisabled , designerContext , componentContext , designerContext . state ) ;
15
+ return new SelectStepBehavior ( pressedStepComponent , isDragDisabled , designerContext , designerContext . state ) ;
18
16
}
19
17
20
18
private constructor (
21
19
private readonly pressedStepComponent : StepComponent ,
22
20
private readonly isDragDisabled : boolean ,
23
21
private readonly designerContext : DesignerContext ,
24
- private readonly componentContext : ComponentContext ,
25
22
private readonly state : DesignerState
26
23
) { }
27
24
@@ -34,12 +31,7 @@ export class SelectStepBehavior implements Behavior {
34
31
const canDrag = ! this . state . isReadonly && ! this . isDragDisabled ;
35
32
if ( canDrag ) {
36
33
this . state . setSelectedStepId ( null ) ;
37
- return DragStepBehavior . create (
38
- this . designerContext ,
39
- this . componentContext ,
40
- this . pressedStepComponent . step ,
41
- this . pressedStepComponent
42
- ) ;
34
+ return DragStepBehavior . create ( this . designerContext , this . pressedStepComponent . step , this . pressedStepComponent ) ;
43
35
} else {
44
36
return MoveViewPortBehavior . create ( this . state , false ) ;
45
37
}
0 commit comments