Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/DDCore.html view on Meta::CPAN
},
<span id='Ext-dd-DragDropMgr-method-isDragDrop'> /**
</span> * Utility function to determine if a given element has been
* registered as a drag drop item.
* @method isDragDrop
* @param {String} id the element id to check
* @return {boolean} true if this element is a DragDrop item,
* false otherwise
*/
isDragDrop: function(id) {
return ( this.getDDById(id) ) ? true : false;
},
<span id='Ext-dd-DragDropMgr-method-getRelated'> /**
</span> * Returns the drag and drop instances that are in all groups the
* passed in instance belongs to.
* @method getRelated
* @param {DragDrop} p_oDD the obj to get related data for
* @param {boolean} bTargetsOnly if true, only return targetable objs
* @return {DragDrop[]} the related instances
*/
getRelated: function(p_oDD, bTargetsOnly) {
var oDDs = [];
for (var i in p_oDD.groups) {
for (var j in this.ids[i]) {
var dd = this.ids[i][j];
if (! this.isTypeOfDD(dd)) {
continue;
}
if (!bTargetsOnly || dd.isTarget) {
oDDs[oDDs.length] = dd;
}
}
}
return oDDs;
},
<span id='Ext-dd-DragDropMgr-method-isLegalTarget'> /**
</span> * Returns true if the specified dd target is a legal target for
* the specifice drag obj
* @method isLegalTarget
* @param {DragDrop} oDD the drag obj
* @param {DragDrop} oTargetDD the target
* @return {boolean} true if the target is a legal target for the
* dd obj
*/
isLegalTarget: function (oDD, oTargetDD) {
var targets = this.getRelated(oDD, true);
for (var i=0, len=targets.length;i<len;++i) {
if (targets[i].id == oTargetDD.id) {
return true;
}
}
return false;
},
<span id='Ext-dd-DragDropMgr-method-isTypeOfDD'> /**
</span> * My goal is to be able to transparently determine if an object is
* typeof DragDrop, and the exact subclass of DragDrop. typeof
* returns "object", oDD.constructor.toString() always returns
* "DragDrop" and not the name of the subclass. So for now it just
* evaluates a well-known variable in DragDrop.
* @method isTypeOfDD
* @param {Object} the object to evaluate
* @return {boolean} true if typeof oDD = DragDrop
*/
isTypeOfDD: function (oDD) {
return (oDD && oDD.__ygDragDrop);
},
<span id='Ext-dd-DragDropMgr-method-isHandle'> /**
</span> * Utility function to determine if a given element has been
* registered as a drag drop handle for the given Drag Drop object.
* @method isHandle
* @param {String} id the element id to check
* @return {boolean} true if this element is a DragDrop handle, false
* otherwise
*/
isHandle: function(sDDId, sHandleId) {
return ( this.handleIds[sDDId] &&
this.handleIds[sDDId][sHandleId] );
},
<span id='Ext-dd-DragDropMgr-method-getDDById'> /**
</span> * Returns the DragDrop instance for a given id
* @method getDDById
* @param {String} id the id of the DragDrop object
* @return {DragDrop} the drag drop object, null if it is not found
*/
getDDById: function(id) {
for (var i in this.ids) {
if (this.ids[i][id]) {
return this.ids[i][id];
}
}
return null;
},
<span id='Ext-dd-DragDropMgr-method-handleMouseDown'> /**
</span> * Fired after a registered DragDrop object gets the mousedown event.
* Sets up the events required to track the object being dragged
* @method handleMouseDown
* @param {Event} e the event
* @param oDD the DragDrop object being dragged
* @private
*/
handleMouseDown: function(e, oDD) {
if(Ext.QuickTips){
Ext.QuickTips.ddDisable();
}
if(this.dragCurrent){
// the original browser mouseup wasn't handled (e.g. outside FF browser window)
// so clean up first to avoid breaking the next drag
this.handleMouseUp(e);
}
this.currentTarget = e.getTarget();
this.dragCurrent = oDD;
( run in 1.511 second using v1.01-cache-2.11-cpan-119454b85a5 )