# getDraggables()

This method returns draggables based on the arguments passed as it is a overloaded function.&#x20;

#### **Definition:**

* `static getDraggables(): Draggables`
* `static getDraggables(instance: Redrop): DraggableInfo[]`
* `static getDraggables(instance: Redrop, element: Element | DraggableElement | null): DraggableInfo`

_Description:_ Retrieves draggable elements, their options, or specific draggable information based on the provided arguments.

**Overloads:**

1.  **Retrieve all draggables globally:**

    ```typescript
    static getDraggables(): Draggables
    ```

    * **Description:** Returns all global draggables managed by the `Redrop` class.
    * **Returns:**
      * **`Draggables`**: A map of all global draggable elements and their associated options.

    **Example:**

    ```typescript
    const allDraggables = Redrop.getDraggables();
    console.log(allDraggables);
    ```


2.  **Retrieve draggables from a specific `Redrop` instance:**

    ```typescript
    static getDraggables(instance: Redrop): DraggableInfo[]
    ```

    * **Description:** Returns information about all draggables associated with a specific `Redrop` instance.
    * **Parameters:**
      * **`instance`** (`Redrop`): The `Redrop` instance to retrieve draggable information from.
    * **Returns:**
      * **`DraggableInfo[]`**: An array of draggable elements and their options for the provided instance.

    **Example:**

    ```typescript
    const draggablesFromInstance = Redrop.getDraggables(redropInstance);
    console.log(draggablesFromInstance);
    ```


3.  **Retrieve information about a specific draggable:**

    ```typescript
    static getDraggables(instance: Redrop, element: Element | DraggableElement | null): DraggableInfo
    ```

    * **Description:** Returns information about a specific draggable element in a specific `Redrop` instance.
    * **Parameters:**
      * **`instance`** (`Redrop`): The `Redrop` instance to search for the draggable element.
      * **`element`** (`Element | DraggableElement | null`): The specific draggable element to retrieve information for.
    * **Returns:**
      * **`DraggableInfo`**: Information about the draggable element and its options, or `undefined` if not found.

    **Example:**

    ```typescript
    const specificDraggable = Redrop.getDraggables(redropInstance, draggableElement);
    console.log(specificDraggable);
    ```

***
