Skip to content

Commit 055cc0e

Browse files
committed
feat(draggable): pass previous position to the drag callback
1 parent 91ca657 commit 055cc0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jquery.draggable.js

+4
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,14 @@
289289
'top' : offset.top
290290
});
291291

292+
var last_position = this.last_position || data.position;
293+
data.prev_position = last_position;
292294

293295
if (this.options.drag) {
294296
this.options.drag.call(this.$player, e, data);
295297
}
298+
299+
this.last_position = data.position;
296300
return false;
297301
};
298302

0 commit comments

Comments
 (0)