Skip to content

Commit 83b7229

Browse files
authored
Add missing position offset prop (#962)
1 parent 0c8a8de commit 83b7229

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import Draggable, { DraggableEventHandler } from "react-draggable";
2+
import Draggable, { DraggableEventHandler, DraggableProps } from "react-draggable";
33
import { Enable, Resizable, ResizeDirection } from "re-resizable";
44
import { flushSync } from "react-dom";
55

@@ -155,6 +155,7 @@ export interface Props {
155155
disableDragging?: boolean;
156156
cancel?: string;
157157
enableUserSelectHack?: boolean;
158+
dragPositionOffset?: DraggableProps["positionOffset"];
158159
allowAnyClick?: boolean;
159160
scale?: number;
160161
[key: string]: any;
@@ -600,6 +601,7 @@ export class Rnd extends React.PureComponent<Props, State> {
600601
resizeHandleWrapperStyle,
601602
scale,
602603
allowAnyClick,
604+
dragPositionOffset,
603605
...resizableProps
604606
} = this.props;
605607
const defaultValue = this.props.default ? { ...this.props.default } : undefined;
@@ -648,6 +650,7 @@ export class Rnd extends React.PureComponent<Props, State> {
648650
scale={scale}
649651
allowAnyClick={allowAnyClick}
650652
nodeRef={this.resizableElement}
653+
positionOffset={dragPositionOffset}
651654
>
652655
<Resizable
653656
{...resizableProps}

0 commit comments

Comments
 (0)