getDroppables()
This method returns droppables based on the arguments passed as it is a overloaded function.
Definition:
static getDroppables(): Droppables
static getDroppables(instance: Redrop): DroppableInfo[]
static getDroppables(instance: Redrop, element: Element | DroppableElement | null): DroppableInfo
Description: Retrieves droppable elements, their options, or specific droppable information based on the provided arguments.
Overloads:
Retrieve all droppables globally:
static getDroppables(): Droppables
Description: Returns all global droppables managed by the
Redrop
class.Returns:
Droppables
: A map of all global droppable elements and their associated options.
Example:
const allDroppables = Redrop.getDroppables(); console.log(allDroppables);
Retrieve droppables from a specific
Redrop
instance:static getDroppables(instance: Redrop): DroppableInfo[]
Description: Returns information about all droppables associated with a specific
Redrop
instance.Parameters:
instance
(Redrop
): TheRedrop
instance to retrieve droppable information from.
Returns:
DroppableInfo[]
: An array of droppable elements and their options for the provided instance.
Example:
const droppablesFromInstance = Redrop.getDroppables(redropInstance); console.log(droppablesFromInstance);
Retrieve information about a specific droppable:
static getDroppables(instance: Redrop, element: Element | DroppableElement | null): DroppableInfo
Description: Returns information about a specific droppable element in a specific
Redrop
instance.Parameters:
instance
(Redrop
): TheRedrop
instance to search for the droppable element.element
(Element | DroppableElement | null
): The specific droppable element to retrieve information for.
Returns:
DroppableInfo
: Information about the droppable element and its options, orundefined
if not found.
Example:
const specificDroppable = Redrop.getDroppables(redropInstance, droppableElement); console.log(specificDroppable);
Last updated