# Yahoo! UI Library

### dd 3.0.0

Yahoo! UI Library > dd > DD.Drop
Search:
Filters Show Private Show Protected Show Deprecated

## Class DD.Drop - extends Base

Known Subclasses:
  Plugin.Drop

This class provides the ability to create a Drop Target.

### Constructor

DD.Drop `( )`

### Properties

#### _groups - `private Array`

The groups this target belongs to.

#### _valid - `private Boolean`

Flag for determining if the target is valid in this operation.

#### overTarget - `Boolean`

This flag is tripped when a drag element is over this target.

#### region - `Object`

A region object associated with this target, used for checking regions while dragging.

#### shim - `{Object}`

Node reference to the targets shim

#### Properties inherited from Attribute:

``

#### Properties inherited from Base:

`name`

### Methods

#### _activateShim

`private void _activateShim ( )`
Activates the shim and adds some interaction CSS classes

#### _createEvents

`private void _createEvents ( )`
This method creates all the events for this Event Target and publishes them so we get Event Bubbling.

#### _createShim

`private void _createShim ( )`
Creates the Target shim and adds it to the DDM's playground..

#### _deactivateShim

`private void _deactivateShim ( )`
Removes classes from the target, resets some flags and sets the shims deactive position [-999, -999]

#### _handleOut

`private void _handleOut ( )`
Handles out of target calls/checks

#### _handleOutEvent

`private void _handleOutEvent ( )`
Handles the mouseout DOM event on the Target Shim

#### _handleOverEvent

`private void _handleOverEvent ( )`
Handles the mouseover DOM event on the Target Shim

#### _handleOverTarget

`private void _handleOverTarget ( )`
This handles the over target call made from this object or from the DDM

#### destructor

`private void destructor ( )`
Lifecycle destructor, unreg the drag from the DDM and remove listeners

#### inGroup

`inGroup ( groups )`
Check if this target is in one of the supplied groups.

Parameters:
  `groups <Array>` The groups to check against

Returns: ``
  Boolean

#### initializer

`private void initializer ( )`
Private lifecycle method

#### sizeShim

`void sizeShim ( )`
Positions and sizes the shim with the raw data from the node, this can be used to programatically adjust the Targets shim for Animation..

#### Methods inherited from EventTarget:

`_getType, _parseType, addTarget, after, before, bubble, detach, detachAll, fire, getEvent, on, publish, removeTarget, subscribe, unsubscribe, unsubscribeAll`

#### Methods inherited from Attribute:

`_addAttrs, _addLazyAttr, _defAttrChangeFn, _fireAttrChange, _getAttr, _getAttrInitVal, _getAttrs, _getStateVal, _isLazyAttr, _normAttrVals, _protectAttrs, _set, _setAttr, _setAttrs, _setAttrVal, _setStateVal, addAttr, addAttrs, attrAdded, get, getAttrs, modifyAttr, removeAttr, reset, set, setAttrs`

#### Methods inherited from Base:

`_aggregateAttrs, _defDestroyFn, _defInitFn, _destroyHierarchy, _filterAttrCfs, _getAttrCfgs, _getClasses, _initHierarchy, _initHierarchyData, destroy, init, toString`

### Events

#### bubblesChange

`bubblesChange ( event )`
Fires when the value for the configuration attribute 'bubbles' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### drop:enter

`drop:enter ( )`
Fires when a drag element enters this target.
Bubbles: This event bubbles to DDM.

#### drop:exit

`drop:exit ( )`
Fires when a drag element exits this target.
Bubbles: This event bubbles to DDM.

#### drop:hit

`drop:hit ( )`
Fires when a draggable node is dropped on this Drop Target. (Fired from dd-ddm-drop)
Bubbles: This event bubbles to DDM.

#### drop:over

`drop:over ( )`
Fires when a drag element is over this target.
Bubbles: This event bubbles to DDM.

#### groupsChange

`groupsChange ( event )`
Fires when the value for the configuration attribute 'groups' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### lockChange

`lockChange ( event )`
Fires when the value for the configuration attribute 'lock' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### nodeChange

`nodeChange ( event )`
Fires when the value for the configuration attribute 'node' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### paddingChange

`paddingChange ( event )`
Fires when the value for the configuration attribute 'padding' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### Events inherited from Base:

`destroy, destroyedChange, init, initializedChange,`

### Configuration Attributes

#### bubbles `- Object`

Controls the default bubble parent for this Drop instance. Default: Y.DD.DDM. Set to false to disable bubbling.

#### groups `- Array`

Array of groups to add this drop into.

#### lock `- Boolean`

Set to lock this drop element.

#### node `- Node`

Y.Node instanace to use as the element to make a Drop Target

#### padding `- String`

CSS style padding to make the Drop Target bigger than the node.

#### Configuration attributes inherited from Base:

`destroyed, initialized,`

Copyright © 2009 Yahoo! Inc. All rights reserved.