File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export type HandleComponent = {
113113 bottomRight ?: React . ReactElement < any > ;
114114 bottomLeft ?: React . ReactElement < any > ;
115115 topLeft ?: React . ReactElement < any > ;
116- }
116+ } ;
117117
118118export interface Props {
119119 dragGrid ?: Grid ;
@@ -363,8 +363,11 @@ export class Rnd extends React.PureComponent<Props, State> {
363363 this . resizing = true ;
364364
365365 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 } ;
366369 this . setState ( {
367- original : this . getDraggablePosition ( ) ,
370+ original : pos ,
368371 } ) ;
369372 if ( this . props . bounds ) {
370373 const parent = this . getParent ( ) ;
@@ -587,7 +590,7 @@ export class Rnd extends React.PureComponent<Props, State> {
587590 } ;
588591 }
589592 // 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 ;
591594 return (
592595 < Draggable
593596 ref = { this . refDraggable }
You can’t perform that action at this time.
0 commit comments