Ext.data.JsonP.Ext_dd_DragDropManager({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":["Ext.tip.QuickTipManager"],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base"],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"INTERSECT","id":"property-INTERSECT"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"POINT","id":"property-POINT"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"clickPixelThresh","id":"property-clickPixelThresh"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"clickTimeThresh","id":"property-clickTimeThresh"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"clickTimeout","id":"property-clickTimeout"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"deltaX","id":"property-deltaX"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"deltaY","id":"property-deltaY"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"dragCurrent","id":"property-dragCurrent"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"dragOvers","id":"property-dragOvers"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"dragThreshMet","id":"property-dragThreshMet"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"elementCache","id":"property-elementCache"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"handleIds","id":"property-handleIds"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"ids","id":"property-ids"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"initialized","id":"property-initialized"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"locationCache","id":"property-locationCache"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"locked","id":"property-locked"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"mode","id":"property-mode"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"notifyOccluded","id":"property-notifyOccluded"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"preventDefault","id":"property-preventDefault"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"startX","id":"property-startX"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"startY","id":"property-startY"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"stopPropagation","id":"property-stopPropagation"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"property","name":"useCache","id":"property-useCache"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"_execOnAll","id":"method-_execOnAll"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"_onLoad","id":"method-_onLoad"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"_onResize","id":"method-_onResize"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"_onUnload","id":"method-_onUnload"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"_remove","id":"method-_remove"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"byZIndex","id":"method-byZIndex"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"fireEvents","id":"method-fireEvents"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getBestMatch","id":"method-getBestMatch"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getCss","id":"method-getCss"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getDDById","id":"method-getDDById"},{"meta":{"deprecated":{"text":"This wrapper isn't that useful"},"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getElWrapper","id":"method-getElWrapper"},{"meta":{"deprecated":{"text":"use Ext.lib.Ext.getDom instead"}},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getElement","id":"method-getElement"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getLocation","id":"method-getLocation"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getRelated","id":"method-getRelated"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"getZIndex","id":"method-getZIndex"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"handleMouseDown","id":"method-handleMouseDown"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"handleMouseMove","id":"method-handleMouseMove"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"handleMouseUp","id":"method-handleMouseUp"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"init","id":"method-init"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isDragDrop","id":"method-isDragDrop"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isHandle","id":"method-isHandle"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isLegalTarget","id":"method-isLegalTarget"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isLocked","id":"method-isLocked"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isOverTarget","id":"method-isOverTarget"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"isTypeOfDD","id":"method-isTypeOfDD"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"lock","id":"method-lock"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"refreshCache","id":"method-refreshCache"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"regDragDrop","id":"method-regDragDrop"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"regHandle","id":"method-regHandle"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"removeDDFromGroup","id":"method-removeDDFromGroup"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"startDrag","id":"method-startDrag"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"stopDrag","id":"method-stopDrag"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"stopEvent","id":"method-stopEvent"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"unlock","id":"method-unlock"},{"meta":{"private":true},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"unregAll","id":"method-unregAll"},{"meta":{},"owner":"Ext.dd.DragDropManager","tagname":"method","name":"verifyEl","id":"method-verifyEl"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":"Ext.Base","html":"
Alternate names
Ext.dd.DDMExt.dd.DragDropMgrHierarchy
Ext.BaseExt.dd.DragDropManagerRequires
Uses
Files
DragDropManager is a singleton that tracks the element interaction for\nall DragDrop items in the window. Generally, you will not call\nthis class directly, but it does have helper methods that could\nbe useful in your DragDrop implementations.
\nIn intersect mode, drag and drop interaction is defined by the\noverlap of two or more drag and drop objects.
\nDefaults to: 1
In point mode, drag and drop interaction is defined by the\nlocation of the cursor during the drag/drop
\nDefaults to: 0
The number of pixels that the mouse needs to move after the\nmousedown before the drag is initiated. Default=3;
\nDefaults to: 3
The number of milliseconds after the mousedown event to initiate the\ndrag if we don't get a mouseup event. Default=350
\nDefaults to: 350
Timeout used for the click time threshold
\nDefaults to: null
the X distance between the cursor and the object being dragged
\nDefaults to: 0
the Y distance between the cursor and the object being dragged
\nDefaults to: 0
the DragDrop object that is currently being dragged
\nDefaults to: null
the DragDrop object(s) that are being hovered over
\nDefaults to: {}
Flag that indicates that either the drag pixel threshold or the\nmousdown time threshold has been met
\nDefaults to: false
Array of element ids defined as drag handles. Used to determine\nif the element that generated the mousedown event is actually the\nhandle and not the html element itself.
\nDefaults to: {}
Two dimensional Array of registered DragDrop objects. The first\ndimension is the DragDrop item group, the second the DragDrop\nobject.
\nDefaults to: {}
Internal flag that is set to true when drag and drop has been\nintialized
\nDefaults to: false
Location cache that is set for all drag drop objects when a drag is\ninitiated, cleared when the drag is finished.
\nDefaults to: {}
This config is only provided to provide old, usually unwanted drag/drop behaviour.
\n\nFrom ExtJS 4.1.0 onwards, when drop targets are contained in floating, absolutely positioned elements\nsuch as in Windows, which may overlap each other, over
and drop
events\nare only delivered to the topmost drop target at the mouse position.
If all targets below that in zIndex order should also receive notifications, set\nnotifyOccluded
to true
.
Defaults to: false
Flag to determine if we should prevent the default behavior of the\nevents we define. By default this is true, but this can be set to\nfalse if you need the default behavior (not recommended)
\nDefaults to: true
Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self
is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison
Ext.define('My.Cat', {\n statics: {\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n alert(this.self.speciesName); // dependent on 'this'\n },\n\n clone: function() {\n return new this.self();\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\n
\nThe X position of the mousedown event stored for later use when a\ndrag threshold is met.
\nDefaults to: 0
The Y position of the mousedown event stored for later use when a\ndrag threshold is met.
\nDefaults to: 0
Flag to determine if we should stop the propagation of the events\nwe generate. This is true by default but you may want to set it to\nfalse if the html element contains other features that require the\nmouse click.
\nDefaults to: true
Drag and drop initialization. Sets up the global event handlers
\nUnregisters a drag and drop item. This is executed in\nDragDrop.unreg, use that method instead of calling this directly.
\nUtility method to pass to Ext.Array.sort when sorting potential drop targets by z-index.
\nCall the original method that was previously overridden with override
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n
\n This method has been deprecated
\nas of 4.1. Use callParent instead.
\n\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callOverridden(arguments)
Returns the result of calling the overridden method
\nCall the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).
\n\n Ext.define('My.Base', {\n constructor: function (x) {\n this.x = x;\n },\n\n statics: {\n method: function (x) {\n return x;\n }\n }\n });\n\n Ext.define('My.Derived', {\n extend: 'My.Base',\n\n constructor: function () {\n this.callParent([21]);\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // alerts 21\n
\n\nThis can be used with an override as follows:
\n\n Ext.define('My.DerivedOverride', {\n override: 'My.Derived',\n\n constructor: function (x) {\n this.callParent([x*2]); // calls original My.Derived constructor\n }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x); // now alerts 42\n
\n\nThis also works with static methods.
\n\n Ext.define('My.Derived2', {\n extend: 'My.Base',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Base.method\n }\n }\n });\n\n alert(My.Base.method(10); // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\nLastly, it also works with overridden static methods.
\n\n Ext.define('My.Derived2Override', {\n override: 'My.Derived2',\n\n statics: {\n method: function (x) {\n return this.callParent([x*2]); // calls My.Derived2.method\n }\n }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callParent(arguments)
Returns the result of calling the parent method
\nIterates over all of the DragDrop elements to find ones we are\nhovering over or dropping on
\nthe event
\nis this a drop op or a mouseover op?
\nHelper function for getting the best match from the list of drag\nand drop objects returned by the drag and drop events when we are\nin INTERSECT mode. It returns either the first object that the\ncursor is over, or the object that has the greatest overlap with\nthe dragged element.
\nThe array of drag and drop objects\ntargeted
\nThe best single match
\nReturns the DragDrop instance for a given id
\nthe id of the DragDrop object
\nthe drag drop object, null if it is not found
\nGet the wrapper for the DOM element specified
\nThis method has been deprecated
\nThis wrapper isn't that useful
\n\nthe id of the element to get
\nthe wrapped element
\nReturns a Region object containing the drag and drop element's position\nand size, including the padding configured for it
\nthe drag and drop object to get the location for.
\na Region object representing the total area\nthe element occupies, including any padding\nthe instance is configured for.
\nReturns the drag and drop instances that are in all groups the\npassed in instance belongs to.
\nthe obj to get related data for
\nif true, only return targetable objs
\nthe related instances
\nCollects the z-index of the passed element, looking up the parentNode axis to find an absolutely positioned ancestor\nwhich is able to yield a z-index. If found to be not absolutely positionedm returns -1.
\n\nThis is used when sorting potential drop targets into z-index order so that only the topmost receives over
and drop
events.
The z-index of the element, or of its topmost absolutely positioned ancestor. Returns -1 if the element is not\nabsolutely positioned.
\nFired after a registered DragDrop object gets the mousedown event.\nSets up the events required to track the object being dragged
\nthe event
\nthe DragDrop object being dragged
\nInternal function to handle the mousemove event. Will be invoked\nfrom the context of the html element.
\n\n@TODO figure out what we can do about mouse events lost when the\nuser drags objects beyond the window boundary. Currently we can\ndetect this in internet explorer by verifying that the mouse is\ndown during the mousemove event. Firefox doesn't give us the\nbutton state on the mousemove event.
\nthe event
\nInternal function to handle the mouseup event. Will be invoked\nfrom the context of the document.
\nthe event
\nCalled the first time an element is registered.
\nInitialize configuration for this class. a typical example:
\n\nExt.define('My.awesome.Class', {\n // The default config\n config: {\n name: 'Awesome',\n isAwesome: true\n },\n\n constructor: function(config) {\n this.initConfig(config);\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\nthis
\nReturns true if the specified dd target is a legal target for\nthe specifice drag obj
\nthe drag obj
\nthe target
\ntrue if the target is a legal target for the\ndd obj
\nChecks the cursor location to see if it over the target
\nThe point to evaluate
\nthe DragDrop object we are inspecting
\ntrue if the mouse is over the target
\nMy goal is to be able to transparently determine if an object is\ntypeof DragDrop, and the exact subclass of DragDrop. typeof\nreturns \"object\", oDD.constructor.toString() always returns\n\"DragDrop\" and not the name of the subclass. So for now it just\nevaluates a well-known variable in DragDrop.
\nobject to evaluate
\ntrue if typeof oDD = DragDrop
\nRefreshes the cache of the top-left and bottom-right points of the\ndrag and drop objects in the specified group(s). This is in the\nformat that is stored in the drag and drop instance, so typical\nusage is:
\n\nExt.dd.DragDropManager.refreshCache(ddinstance.groups);\n
\n\nAlternatively:
\n\nExt.dd.DragDropManager.refreshCache({group1:true, group2:true});\n
\n\n@TODO this really should be an indexed array. Alternatively this\nmethod could accept both.
\nan associative array of groups to refresh
\nEach DragDrop instance must be registered with the DragDropManager.\nThis is executed in DragDrop.init()
\nthe DragDrop object to register
\nthe name of the group this element belongs to
\nGet the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics()
is scope-independent and it always returns the class from which it was called, regardless of what\nthis
points to during run-time
Ext.define('My.Cat', {\n statics: {\n totalCreated: 0,\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n var statics = this.statics();\n\n alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to\n // equivalent to: My.Cat.speciesName\n\n alert(this.self.speciesName); // dependent on 'this'\n\n statics.totalCreated++;\n },\n\n clone: function() {\n var cloned = new this.self; // dependent on 'this'\n\n cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName\n\n return cloned;\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n },\n\n constructor: function() {\n this.callParent();\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\nalert(clone.groupName); // alerts 'Cat'\n\nalert(My.Cat.totalCreated); // alerts 3\n
\nInternal function to clean up event handlers after the drag\noperation is complete
\nthe event
\nUtility to stop event propagation and event default, if these\nfeatures are turned on.
\nthe event as returned by this.getEvent()
\nCleans up the drag and drop events and objects.
\nThis checks to make sure an element exists and is in the DOM. The\nmain purpose is to handle cases where innerHTML is used to remove\ndrag and drop objects from the DOM. IE provides an 'unspecified\nerror' when trying to access the offsetParent of such an element
\nthe element to check
\ntrue if the element looks usable
\n