File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export type HandleComponent = {
113
113
bottomRight ?: React . ReactElement < any > ;
114
114
bottomLeft ?: React . ReactElement < any > ;
115
115
topLeft ?: React . ReactElement < any > ;
116
- }
116
+ } ;
117
117
118
118
export interface Props {
119
119
dragGrid ?: Grid ;
@@ -363,8 +363,11 @@ export class Rnd extends React.PureComponent<Props, State> {
363
363
this . resizing = true ;
364
364
365
365
const scale = this . props . scale as number ;
366
+ const offset = this . getOffsetFromParent ( ) ;
367
+ const pos = this . getDraggablePosition ( ) ;
368
+ this . resizingPosition = { x : pos . x + offset . left , y : pos . y + offset . top } ;
366
369
this . setState ( {
367
- original : this . getDraggablePosition ( ) ,
370
+ original : pos ,
368
371
} ) ;
369
372
if ( this . props . bounds ) {
370
373
const parent = this . getParent ( ) ;
@@ -587,7 +590,7 @@ export class Rnd extends React.PureComponent<Props, State> {
587
590
} ;
588
591
}
589
592
// INFO: Make uncontorolled component when resizing to control position by setPostion.
590
- const pos = this . resizing ? undefined : draggablePosition
593
+ const pos = this . resizing ? undefined : draggablePosition ;
591
594
return (
592
595
< Draggable
593
596
ref = { this . refDraggable }
You can’t perform that action at this time.
0 commit comments