File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,6 @@ export default class Draggable extends DraggableCore {
167
167
168
168
let uiEvent = createUIEvent ( this , coreEvent ) ;
169
169
170
- // Short-circuit if user's callback killed it.
171
- let shouldUpdate = this . props . onDrag ( e , uiEvent ) ;
172
- if ( shouldUpdate === false ) return false ;
173
-
174
170
let newState = {
175
171
clientX : uiEvent . position . left ,
176
172
clientY : uiEvent . position . top
@@ -193,8 +189,16 @@ export default class Draggable extends DraggableCore {
193
189
// Recalculate slack by noting how much was shaved by the boundPosition handler.
194
190
newState . slackX = this . state . slackX + ( clientX - newState . clientX ) ;
195
191
newState . slackY = this . state . slackY + ( clientY - newState . clientY ) ;
192
+
193
+ // Update the event we fire.
194
+ uiEvent . position . left = clientX ;
195
+ uiEvent . position . top = clientY ;
196
196
}
197
197
198
+ // Short-circuit if user's callback killed it.
199
+ let shouldUpdate = this . props . onDrag ( e , uiEvent ) ;
200
+ if ( shouldUpdate === false ) return false ;
201
+
198
202
this . setState ( newState ) ;
199
203
} ;
200
204
You can’t perform that action at this time.
0 commit comments