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 authored and zjffun committed Nov 7, 2020
1 parent 8b4d0ec commit 497624a
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 @@ -563,11 +563,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 @@ -611,8 +612,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 497624a

Please sign in to comment.