Yahoo! UI Library

dd  3.1.0

Yahoo! UI Library > dd > DD.Drop
Search:
 
Filters

Class DD.Drop - extends Base

Known Subclasses:
Plugin.Drop
Provides the ability to create a Drop Target.

Constructor

DD.Drop ( )

Properties

_bubbleTargets - private object

The default bubbleTarget for this object. Default: Y.DD.DDM

_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:

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

addToGroup

Self addToGroup ( g )
Add this Drop instance to a group, this should be used for on-the-fly group additions.
Parameters:
g <String> The group to add this Drop Instance to.
Chainable: This method is chainable.

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

removeFromGroup

Self removeFromGroup ( g )
Remove this Drop instance from a group, this should be used for on-the-fly group removals.
Parameters:
g <String> The group to remove this Drop Instance from.
Chainable: This method is chainable.

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..

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 ( event )
Fires when a drag element enters this target.
Parameters:
event <Event.Facade> An Event Facade object with the following specific property added:
drop
The drop object at the time of the event.
drag
The drag object at the time of the event.
Bubbles: This event bubbles to DDM.

drop:exit

drop:exit ( event )
Fires when a drag element exits this target.
Parameters:
event <Event.Facade> An Event Facade object
Bubbles: This event bubbles to DDM.

drop:hit

drop:hit ( event )
Fires when a draggable node is dropped on this Drop Target. (Fired from dd-ddm-drop)
Parameters:
event <Event.Facade> An Event Facade object with the following specific property added:
drop
The best guess on what was dropped on.
drag
The drag object at the time of the event.
others
An array of all the other drop targets that was dropped on.
Bubbles: This event bubbles to DDM.

drop:over

drop:over ( event )
Fires when a drag element is over this target.
Parameters:
event <Event.Facade> An Event Facade object with the following specific property added:
drop
The drop object at the time of the event.
drag
The drag object at the time of the event.
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

useShimChange

useShimChange ( event )
Fires when the value for the configuration attribute 'useShim' 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:

Configuration Attributes

bubbles - Object

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

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.

useShim - Boolean

Use the Drop shim. Default: true
Deprecated  

Configuration attributes inherited from Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.