Skip to content

Commit 1ce39ba

Browse files
committed
Add sensorEvent property to 'drag:stop' and 'drag:stopped' event
1 parent 0c34d87 commit 1ce39ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Draggable/Draggable.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,12 @@ export default class Draggable {
557557

558558
this.dragging = false;
559559

560+
const sensorEvent = getSensorEvent(event);
560561
const dragStopEvent = new DragStopEvent({
561562
source: this.source,
562563
originalSource: this.originalSource,
563-
sensorEvent: event.sensorEvent,
564564
sourceContainer: this.sourceContainer,
565+
sensorEvent,
565566
});
566567

567568
this.trigger(dragStopEvent);
@@ -605,8 +606,8 @@ export default class Draggable {
605606
const dragStoppedEvent = new DragStoppedEvent({
606607
source: this.source,
607608
originalSource: this.originalSource,
608-
sensorEvent: event.sensorEvent,
609609
sourceContainer: this.sourceContainer,
610+
sensorEvent,
610611
});
611612

612613
this.trigger(dragStoppedEvent);

0 commit comments

Comments
 (0)