Class DD.Drop
- extends Base
- Known Subclasses:
-
Plugin.Drop
This class provides the ability to create a Drop Target.
Properties
_groups
- private Array
The groups this target belongs to.
_valid
- private Boolean
Flag for determining if the target is valid in this operation.
This flag is tripped when a drag element is over this target.
A region object associated with this target, used for checking regions while dragging.
shim
- {Object}
Node reference to the targets shim
Properties inherited from Base:
Methods
private
void
_activateShim
(
)
Activates the shim and adds some interaction CSS classes
private
void
_createEvents
(
)
This method creates all the events for this Event Target and publishes them so we get Event Bubbling.
private
void
_createShim
(
)
Creates the Target shim and adds it to the DDM's playground..
private
void
_deactivateShim
(
)
Removes classes from the target, resets some flags and sets the shims deactive position [-999, -999]
private
void
_handleOut
(
)
Handles out of target calls/checks
private
void
_handleOutEvent
(
)
Handles the mouseout DOM event on the Target Shim
private
void
_handleOverEvent
(
)
Handles the mouseover DOM event on the Target Shim
private
void
_handleOverTarget
(
)
This handles the over target call made from this object or from the DDM
private
void
destructor
(
)
Lifecycle destructor, unreg the drag from the DDM and remove listeners
inGroup
(
groups
)
Check if this target is in one of the supplied groups.
- Parameters:
-
groups
<Array>
The groups to check against
- Returns:
- Boolean
private
void
initializer
(
)
Private lifecycle method
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
(
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
(
)
Fires when a drag element enters this target.
Bubbles: This event bubbles to
DDM.
drop:exit
(
)
Fires when a drag element exits this target.
Bubbles: This event bubbles to
DDM.
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
(
)
Fires when a drag element is over this target.
Bubbles: This event bubbles to
DDM.
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
(
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
(
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
(
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:
Configuration Attributes
Controls the default bubble parent for this Drop instance. Default: Y.DD.DDM. Set to false to disable bubbling.
Array of groups to add this drop into.
lock
- Boolean
Set to lock this drop element.
Y.Node instanace to use as the element to make a Drop Target
CSS style padding to make the Drop Target bigger than the node.
Configuration attributes inherited from Base: