From 1ce39badf208bb944c92facbb0f9a3285d5ac714 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 2f471fb6..38fb9159 100644 --- a/src/Draggable/Draggable.js +++ b/src/Draggable/Draggable.js @@ -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); @@ -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);