@@ -37,18 +37,18 @@ class Rectangle extends Component<PropsInt, StateInt> {
37
37
image : null ,
38
38
} ;
39
39
40
- getComponentColor ( componentId : number ) {
40
+ getComponentColor = ( componentId : number ) => {
41
41
const color = this . props . components . find ( ( comp : ComponentInt ) => comp . id === componentId ) . color ;
42
42
return color ;
43
43
}
44
44
45
- getPseudoChild ( ) {
45
+ getPseudoChild = ( ) => {
46
46
return this . props . components . find (
47
47
( comp : ComponentInt ) => comp . id === this . props . childComponentId ,
48
48
) ;
49
49
}
50
50
51
- handleResize ( componentId : number , childId : number , target : any , blockSnapSize : number ) {
51
+ handleResize = ( componentId : number , childId : number , target : any , blockSnapSize : number ) => {
52
52
let focChild : ChildInt = this . props . components
53
53
. find ( ( comp : ComponentInt ) => comp . id === this . props . componentId )
54
54
. children . find ( ( child : ChildInt ) => child . childId === childId ) ;
@@ -68,7 +68,7 @@ class Rectangle extends Component<PropsInt, StateInt> {
68
68
this . props . handleTransform ( componentId , childId , transformation ) ;
69
69
}
70
70
71
- handleDrag ( componentId : number , childId : number , target : any , blockSnapSize : any ) {
71
+ handleDrag = ( componentId : number , childId : number , target : any , blockSnapSize : any ) => {
72
72
const transformation = {
73
73
x : Math . round ( target . x ( ) / blockSnapSize ) * blockSnapSize ,
74
74
y : Math . round ( target . y ( ) / blockSnapSize ) * blockSnapSize ,
0 commit comments