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 {
167167
168168 let uiEvent = createUIEvent ( this , coreEvent ) ;
169169
170- // Short-circuit if user's callback killed it.
171- let shouldUpdate = this . props . onDrag ( e , uiEvent ) ;
172- if ( shouldUpdate === false ) return false ;
173-
174170 let newState = {
175171 clientX : uiEvent . position . left ,
176172 clientY : uiEvent . position . top
@@ -193,8 +189,16 @@ export default class Draggable extends DraggableCore {
193189 // Recalculate slack by noting how much was shaved by the boundPosition handler.
194190 newState . slackX = this . state . slackX + ( clientX - newState . clientX ) ;
195191 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 ;
196196 }
197197
198+ // Short-circuit if user's callback killed it.
199+ let shouldUpdate = this . props . onDrag ( e , uiEvent ) ;
200+ if ( shouldUpdate === false ) return false ;
201+
198202 this . setState ( newState ) ;
199203 } ;
200204
You can’t perform that action at this time.
0 commit comments