From 497624ad3103b4f30e780f0466e33f2a4a2da82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguye=CC=82=CC=83n=20Ba=CC=81=20Hu=CC=9Bng?= Date: Wed, 4 Nov 2020 19:00:25 +0700 Subject: [PATCH] Add sensorEvent property to 'drag:stop' and 'drag:stopped' event --- src/Draggable/Draggable.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Draggable/Draggable.js b/src/Draggable/Draggable.js index 2ff3c5c7e..022060f04 100644 --- a/src/Draggable/Draggable.js +++ b/src/Draggable/Draggable.js @@ -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); @@ -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);