From c8a0eaf1f1aa7bb4c6f24cfc8c6f92dfc2832f58 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 29 Sep 2023 21:17:34 +0000 Subject: [PATCH] fix draggable getDragSource docstring --- scripts/draggable.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/draggable.js b/scripts/draggable.js index 7b8507a..215b944 100644 --- a/scripts/draggable.js +++ b/scripts/draggable.js @@ -2,10 +2,10 @@ const draggableItemUUIDs = {}; /** - * Validate a data transfer object through its data types. Valid draggable-item events have one type of the format `application/json/${uuid}`. - * The function takes the entire type list from event.dataTransfer.types and returns true if the dataTransfer object is likely to be valid. - * @param {*} formatList from event.dataTransfer.types - * @returns {Boolean} true if dataTransfer is valid (from a draggable-item source on this page), false otherwise + * Get the data transfer source object by parsing its types. Valid draggable-item events have one type of the format `application/json/${uuid}`. + * The function takes the entire type list from event.dataTransfer.types and returns the source object if valid, or null if invalid. + * @param {*} typesList from event.dataTransfer.types + * @returns {Object} Object containing the type, uuid, and element of the dataTransfer source or null */ function getDragSource (typesList) { if (typesList.length !== 1) {