@@ -647,15 +647,17 @@ function wrapShape(WrappedComponent) {
647
647
event . stopPropagation ( ) ;
648
648
var angle = this . calculateAngle ( event ) ;
649
649
var onChange = this . props . onChange ;
650
- var _this$state = this . state ,
651
- dragStartCoordinates = _this$state . dragStartCoordinates ,
652
- dragCurrentCoordinates = _this$state . dragCurrentCoordinates ;
653
- var nextRect = getRectFromCornerCoordinates ( dragStartCoordinates , dragCurrentCoordinates , this . state . rotation ) ;
654
650
this . setState ( {
655
651
isRotating : false ,
656
652
rotationStartAngle : angle
657
653
} , function ( ) {
658
- onChange ( nextRect , _this2 . props ) ;
654
+ onChange ( {
655
+ rotation : _this2 . state . rotation ,
656
+ x : _this2 . props . x ,
657
+ y : _this2 . props . y ,
658
+ width : _this2 . props . width ,
659
+ height : _this2 . props . height
660
+ } , _this2 . props ) ;
659
661
} ) ;
660
662
document . removeEventListener ( 'mousemove' , this . handleRotationMove ) ;
661
663
document . removeEventListener ( 'mouseup' , this . handleRotationEnd ) ;
@@ -664,9 +666,9 @@ function wrapShape(WrappedComponent) {
664
666
key : "handleRotationMove" ,
665
667
value : function handleRotationMove ( event ) {
666
668
if ( ! this . state . isRotating ) return ;
667
- var _this$state2 = this . state ,
668
- rotation = _this$state2 . rotation ,
669
- rotationStartAngle = _this$state2 . rotationStartAngle ;
669
+ var _this$state = this . state ,
670
+ rotation = _this$state . rotation ,
671
+ rotationStartAngle = _this$state . rotationStartAngle ;
670
672
var currentAngle = this . calculateAngle ( event ) ;
671
673
var deltaAngle = currentAngle - rotationStartAngle ;
672
674
var rotationSpeed = this . props . rotationSpeed || 1 ;
@@ -750,10 +752,10 @@ function wrapShape(WrappedComponent) {
750
752
}
751
753
752
754
var onChange = this . props . onChange ;
753
- var _this$state3 = this . state ,
754
- dragStartCoordinates = _this$state3 . dragStartCoordinates ,
755
- dragCurrentCoordinates = _this$state3 . dragCurrentCoordinates ,
756
- isDragToMove = _this$state3 . isDragToMove ;
755
+ var _this$state2 = this . state ,
756
+ dragStartCoordinates = _this$state2 . dragStartCoordinates ,
757
+ dragCurrentCoordinates = _this$state2 . dragCurrentCoordinates ,
758
+ isDragToMove = _this$state2 . isDragToMove ;
757
759
758
760
if ( isDragToMove ) {
759
761
var nextX = dragCurrentCoordinates . x ,
@@ -824,9 +826,9 @@ function wrapShape(WrappedComponent) {
824
826
width = _this$props3 . width ,
825
827
height = _this$props3 . height ,
826
828
getPlaneCoordinatesFromEvent = _this$props3 . getPlaneCoordinatesFromEvent ;
827
- var _this$state4 = this . state ,
828
- dragCurrentCoordinates = _this$state4 . dragCurrentCoordinates ,
829
- dragInnerOffset = _this$state4 . dragInnerOffset ;
829
+ var _this$state3 = this . state ,
830
+ dragCurrentCoordinates = _this$state3 . dragCurrentCoordinates ,
831
+ dragInnerOffset = _this$state3 . dragInnerOffset ;
830
832
831
833
var _getPlaneCoordinatesF = getPlaneCoordinatesFromEvent ( event , dragInnerOffset ) ,
832
834
rawX = _getPlaneCoordinatesF . x ,
@@ -994,12 +996,12 @@ function wrapShape(WrappedComponent) {
994
996
isInSelectionGroup = _this$props8 . isInSelectionGroup ,
995
997
scale = _this$props8 . scale ,
996
998
shapeId = _this$props8 . shapeId ;
997
- var _this$state5 = this . state ,
998
- nativeActive = _this$state5 . nativeActive ,
999
- isMouseDown = _this$state5 . isMouseDown ,
1000
- dragStartCoordinates = _this$state5 . dragStartCoordinates ,
1001
- dragCurrentCoordinates = _this$state5 . dragCurrentCoordinates ,
1002
- rotation = _this$state5 . rotation ;
999
+ var _this$state4 = this . state ,
1000
+ nativeActive = _this$state4 . nativeActive ,
1001
+ isMouseDown = _this$state4 . isMouseDown ,
1002
+ dragStartCoordinates = _this$state4 . dragStartCoordinates ,
1003
+ dragCurrentCoordinates = _this$state4 . dragCurrentCoordinates ,
1004
+ rotation = _this$state4 . rotation ;
1003
1005
var active = artificialActive !== null ? artificialActive : nativeActive ;
1004
1006
var sides = ! isMouseDown ? {
1005
1007
left : this . props . x ,
0 commit comments