v7.3.0

Droppable
Mixin
internal

Mix this into another class to enable drop support and receive drops from draggables.

There are 4 basic methods that a droppable implements. These methods are called as drag operations occur:

 class MyDroppable extends Base.mixin(Droppable) {
     dragEnter(drag) {
         // a drag has entered the drop zone... create some type of drop indicator perhaps
     }

dragMove(drag) { // a drag has changed position... update drop indicators }

dragDrop(drag) { // drop has occurred... process data from the drag context }

dragLeave(drag) { // the drag has left the drop zone... cleanup indicators } }

Instances of Droppable are associated with an element to receive drag operations:

 let target = new MyDroppable({
     dropRootElement : someElement
 });
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Set this config to the element where drops should be received. When set, the b-droppable CSS class is added to the element and the Droppable instance is associated with that element so that it can be found by draggables.

  • A selector, which, if specified, narrows the dropability to child elements of the dropRootElement which match this selector.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • dropEventer : Events
    internal
    READONLY

    Return the Events instance from which drop events are fired.

  • droppableCls : String
    READONLY

    Returns the CSS class that is added to the dropRootElement, i.e., 'b-droppable'.

  • dropping : DragContext
    READONLY

    The current DragContext. This is set when a drag enters this target. Changing this config causes the dragEnter and dragLeave methods to be called. If dragEnter returns false for a drag, this value will be set to null.

  • isDroppable : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of Droppable class, or subclass thereof.

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    Source path

    Core/mixin/Droppable.js

    Contents