We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6670f6 commit ee223f2Copy full SHA for ee223f2
lib/Draggable.es6
@@ -208,9 +208,11 @@ export default class Draggable extends React.Component {
208
newState.slackX = this.state.slackX + (clientX - newState.clientX);
209
newState.slackY = this.state.slackY + (clientY - newState.clientY);
210
211
- // Update the event we fire.
+ // Update the event we fire to reflect what really happened after bounds took effect.
212
uiEvent.position.left = clientX;
213
uiEvent.position.top = clientY;
214
+ uiEvent.deltaX = newState.clientX - this.state.clientX;
215
+ uiEvent.deltaY = newState.clientY - this.state.clientY;
216
}
217
218
// Short-circuit if user's callback killed it.
0 commit comments