Skip to content

Commit

Permalink
[FIX] DropInfo: correct the type of d&d related browser events
Browse files Browse the repository at this point in the history
"DragEvent" is more precise on the one hand, leading to a better
TypeScript experience, and on the other hand avoids the issue that
simply "Event" is somehow (wrongly) interpreted as UI5 event (should be
a browser event).

Related to SAP/ui5-typescript#415

Change-Id: I7be6df5ab541bc8a5ec47eb48cbbacbb60f115fe
  • Loading branch information
akudev committed Sep 4, 2023
1 parent 0176b89 commit 43e032c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/sap.ui.core/src/sap/ui/core/dnd/DragDropInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sap.ui.define(["./DragInfo", "./DropInfo", "sap/base/Log"],
* @param {object} oControlEvent.getParameters
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that will be dragged
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
*/
dragStart: {
Expand All @@ -74,7 +74,7 @@ sap.ui.define(["./DragInfo", "./DropInfo", "sap/base/Log"],
* @param {object} oControlEvent.getParameters
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that is being dragged
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
* @since 1.56
*/
Expand Down
4 changes: 2 additions & 2 deletions src/sap.ui.core/src/sap/ui/core/dnd/DragInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sap.ui.define(["./DragDropBase"],
* @param {object} oControlEvent.getParameters
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that will be dragged
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
*/
dragStart: {
Expand All @@ -67,7 +67,7 @@ sap.ui.define(["./DragDropBase"],
* @param {object} oControlEvent.getParameters
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that is being dragged
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
* @since 1.56
*/
Expand Down
6 changes: 3 additions & 3 deletions src/sap.ui.core/src/sap/ui/core/dnd/DropInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ sap.ui.define(["./DragDropBase"],
* @param {object} oControlEvent.getParameters
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element on which the dragged element will be dropped
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
*/
dragEnter: {
Expand All @@ -83,7 +83,7 @@ sap.ui.define(["./DragDropBase"],
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element on which the dragged element will be dropped
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
* @param {sap.ui.core.dnd.RelativeDropPosition} oControlEvent.getParameters.dropPosition The calculated position of the drop action relative to the <code>target</code>.
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
* @since 1.56
*/
Expand All @@ -102,7 +102,7 @@ sap.ui.define(["./DragDropBase"],
* @param {sap.ui.core.Element} oControlEvent.getParameters.draggedControl The element being dragged
* @param {sap.ui.core.Element} oControlEvent.getParameters.droppedControl The element being dropped
* @param {sap.ui.core.dnd.RelativeDropPosition} oControlEvent.getParameters.dropPosition The calculated position of the drop action relative to the <code>droppedControl</code>.
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
* @param {DragEvent} oControlEvent.getParameters.browserEvent The underlying browser event
* @public
*/
drop: {
Expand Down

0 comments on commit 43e032c

Please sign in to comment.