Skip to content

Commit

Permalink
Add sensorEvent property to 'drag:stop' and 'drag:stopped' event
Browse files Browse the repository at this point in the history
  • Loading branch information
bahung1221 committed Jan 5, 2021
1 parent 0c34d87 commit 1ce39ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Draggable/Draggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,11 +557,12 @@ export default class Draggable {

this.dragging = false;

const sensorEvent = getSensorEvent(event);
const dragStopEvent = new DragStopEvent({
source: this.source,
originalSource: this.originalSource,
sensorEvent: event.sensorEvent,
sourceContainer: this.sourceContainer,
sensorEvent,
});

this.trigger(dragStopEvent);
Expand Down Expand Up @@ -605,8 +606,8 @@ export default class Draggable {
const dragStoppedEvent = new DragStoppedEvent({
source: this.source,
originalSource: this.originalSource,
sensorEvent: event.sensorEvent,
sourceContainer: this.sourceContainer,
sensorEvent,
});

this.trigger(dragStoppedEvent);
Expand Down

0 comments on commit 1ce39ba

Please sign in to comment.