Skip to content

Commit f68c401

Browse files
committed
Bugfix: <DraggableCore> wasn't calling back with DOM node
1 parent 81de84e commit f68c401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils/positionFns.es6

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ export function createCoreData(draggable: DraggableCore, x: number, y: number):
7878
if (isStart) {
7979
// If this is our first move, use the x and y as last coords.
8080
return {
81-
node: ReactDOM.findDOMNode(this),
81+
node: ReactDOM.findDOMNode(draggable),
8282
deltaX: 0, deltaY: 0,
8383
lastX: x, lastY: y,
8484
x: x, y: y
8585
};
8686
} else {
8787
// Otherwise calculate proper values.
8888
return {
89-
node: ReactDOM.findDOMNode(this),
89+
node: ReactDOM.findDOMNode(draggable),
9090
deltaX: x - state.lastX, deltaY: y - state.lastY,
9191
lastX: state.lastX, lastY: state.lastY,
9292
x: x, y: y

0 commit comments

Comments
 (0)