/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_grid_GridDragZone({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.dd.DragZone","uses":[],"html":"
Hierarchy
Ext.dd.DragDropExt.dd.DDExt.dd.DDProxyExt.dd.DragSourceExt.dd.DragZoneExt.grid.GridDragZoneFiles
A customized implementation of a DragZone which provides default implementations of two of the\ntemplate methods of DragZone to enable dragging of the selected rows of a GridPanel.
\n\n\nA cooperating DropZone must be created who's template method implementations of\nonNodeEnter, onNodeOver,\nonNodeOut and onNodeDrop
\n\n\nare able\nto process the data which is provided.
\nTrue to register this container with the Scrollmanager\nfor auto scrolling during drag operations.
\nTrue to register this container with the Scrollmanager\nfor auto scrolling during drag operations.
\nA named drag drop group to which this object belongs. If a group is specified, then this object will only\ninteract with other drag drop objects in the same group (defaults to undefined).
\nThe CSS class returned to the drag source when drop is allowed (defaults to \"x-dd-drop-ok\").
\nDefaults to: "x-dd-drop-ok"
Cached reference to the linked element
\nCached reference to the linked element
\nThe available property is false until the linked dom element is accessible.
\nDefaults to: false
By default the frame is positioned exactly where the drag element is, so\nwe use the cursor offset provided by Ext.dd.DD. Another option that works only if\nyou do not have constraints on the obj is to have the drag frame centered\naround the cursor. Set centerFrame to true for this effect.
\nDefaults to: false
Configuration attributes passed into the constructor
\nConfiguration attributes passed into the constructor
\nSet to true when horizontal contraints are applied
\nDefaults to: false
Set to true when vertical contraints are applied
\nDefaults to: false
Provides default constraint padding to \"constrainTo\" elements (defaults to {left: 0, right:0, top:0, bottom:0}).
\nDefaults to: {left: 0, right: 0, top: 0, bottom: 0}
This property contains the data representing the dragged object. This data is set up by the implementation\nof the getDragData method. It must contain a ddel property, but can contain\nany other data according to the application's needs.
\nThe id of the element that will be dragged. By default this is same\nas the linked element, but could be changed to another element. Ex:\nExt.dd.DDProxy
\nThe group defines a logical collection of DragDrop objects that are\nrelated. Instances only get events when interacting with other\nDragDrop object in the same group. This lets us define multiple\ngroups using a single DragDrop subclass if we want. An object in the format {'group1':true, 'group2':true}
\nThe ID of the element that initiates the drag operation. By default\nthis is the linked element, but could be changed to be a child of this\nelement. This lets us do things like only starting the drag when the\nheader element within the linked html element is clicked.
\nBy default, drags can only be initiated if the mousedown occurs in the\nregion the linked element is. This is done in part to work around a\nbug in some browsers that mis-report the mousedown if the previous\nmouseup happened outside of the window. This property is set to true\nif outer handles are defined. @default false
\nDefaults to: false
The id of the element associated with this object. This is what we\nrefer to as the \"linked element\" because the size and position of\nthis element is used to determine when the drag and drop objects have\ninteracted.
\nSet to false to enable a DragDrop object to fire drag events while dragging\nover its own Element. Defaults to true - DragDrop objects do not by default\nfire drag events to themselves.
\nAn Array of CSS class names for elements to be considered in valid as drag handles.
\nAn Array of CSS class names for elements to be considered in valid as drag handles.
\nAn object who's property names identify the IDs of elements to be considered invalid as drag handles.\nA non-null property value identifies the ID as invalid. For example, to prevent\ndragging from being initiated on element ID \"foo\", use:
\n\n{\n foo: true\n}
\n\nAn object who's property names identify HTML tags to be considered invalid as drag handles.\nA non-null property value identifies the tag as invalid. Defaults to the\nfollowing value which prevents drag operations from being initiated by <a> elements:
\n\n{\n A: \"A\"\n}
\n\nBy default, all instances can be a drop target. This can be disabled by\nsetting isTarget to false.
\nDefaults to: true
Individual drag/drop instances can be locked. This will prevent\nonmousedown start drag.
\nDefaults to: false
Maintain offsets when we resetconstraints. Set to true when you want\nthe position of the element relative to its parent to stay the same\nwhen the page changes
\nDefaults to: false
When set to true, other DD objects in cooperating DDGroups do not receive\nnotification events when this DD object is dragged over them. Defaults to false.
\nDefaults to: false
The padding configured for this drag and drop object for calculating\nthe drop zone intersection with this object. An array containing the 4 padding values: [top, right, bottom, left]
\nBy default the drag and drop instance will only respond to the primary\nbutton click (left button for a right-handed mouse). Set to true to\nallow drag and drop to start with any mouse click that is propogated\nby the browser
\nDefaults to: true
By default we resize the drag frame to be the same size as the element\nwe want to drag (this is to get the frame effect). We can turn it off\nif we want a different behavior.
\nDefaults to: true
When set to true, the utility automatically tries to scroll the browser\nwindow when a drag and drop element is dragged near the viewport boundary.\nDefaults to true.
\nDefaults to: true
The linked element's absolute X position at the time the drag was\nstarted
\nDefaults to: 0
The linked element's absolute X position at the time the drag was\nstarted
\nDefaults to: 0
Array of pixel locations the element will snap to if we specified a\nhorizontal graduation/interval. This array is generated automatically\nwhen you define a tick interval.
\nArray of pixel locations the element will snap to if we specified a\nvertical graduation/interval. This array is generated automatically\nwhen you define a tick interval.
\nThe container element
\nOverrides: Ext.dd.DragSource.constructor
The proxy is automatically resized to the dimensions of the linked\nelement when a drag is initiated, unless resizeFrame is set to false
\nLets you specify a css class of elements that will not initiate a drag
\nthe class of the elements you wish to ignore
\nLets you to specify an element id for a child of a drag handle\nthat should not initiate a drag
\nthe element id of the element you wish to ignore
\nAllows you to specify a tag name that should not start a drag operation\nwhen clicked. This is designed to facilitate embedding links within a\ndrag handle that do something other than start the drag.
\nthe type of element to exclude
\nAdd this instance to a group of related drag/drop objects. All\ninstances belong to at least one group, and can belong to as many\ngroups as needed.
\n{string} the name of the group
\nAn empty function by default, but provided so that you can perform a custom action\nafter a valid drag drop has occurred by providing an implementation.
\nThe drop target
\nThe event object
\nThe id of the dropped element
\nAn empty function by default, but provided so that you can perform a custom action\nwhen the dragged item enters the drop target by providing an implementation.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nAn empty function by default, but provided so that you can perform a custom action\nafter the dragged item is dragged out of the target without dropping.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nAn empty function by default, but provided so that you can perform a custom action\nwhile the dragged item is over the drop target by providing an implementation.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nAn empty function by default, but provided so that you can perform a custom action\nafter an invalid drop has occurred by providing an implementation.
\nThe event object
\nThe id of the dropped element
\nAn empty immplementation. Implement this to provide behaviour after a repair of an invalid drop. An implementation might highlight\nthe selected rows to show that they have not been dragged.
\nOverrides: Ext.dd.DragZone.afterRepair
An empty function by default, but provided so that you can perform a custom action\nafter a valid drop has occurred by providing an implementation.
\nThe target DD
\nThe event object
\nThe id of the dropped element
\nSets the element to the location of the mousedown or click event,\nmaintaining the cursor location relative to the location on the element\nthat was clicked. Override this if you want to place the element in a\nlocation other than where the cursor is.
\nthe element to move
\nthe X coordinate of the mousedown or drag event
\nthe Y coordinate of the mousedown or drag event
\nSets up config options specific to this class. Overrides\nExt.dd.DragDrop, but all versions of this method through the\ninheritance chain are called
\nOverrides: Ext.dd.DragDrop.applyConfig
Sets the pointer offset to the distance between the linked element's top\nleft corner and the location the element was clicked
\nthe X coordinate of the click
\nthe Y coordinate of the click
\nAuto-scroll the window if the dragged object has been moved beyond the\nvisible window boundary.
\nthe drag element's x position
\nthe drag element's y position
\nthe height of the drag element
\nthe width of the drag element
\nEvent that fires prior to the onDrag event. Overrides\nExt.dd.DragDrop.
\nOverrides: Ext.dd.DragDrop.b4Drag
Code that executes immediately before the onDragDrop event
\nCode that executes immediately before the onDragOut event
\nCode that executes immediately before the onDragOver event
\nCode that executes immediately before the endDrag event
\nEvent that fires prior to the onMouseDown event. Overrides\nExt.dd.DragDrop.
\nOverrides: Ext.dd.DragDrop.b4MouseDown
Code that executes immediately before the startDrag event
\nAn empty function by default, but provided so that you can perform a custom action before the dragged\nitem is dropped onto the target and optionally cancel the onDragDrop.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nisValid True if the drag drop event is valid, else false to cancel
\nAn empty function by default, but provided so that you can perform a custom action\nbefore the dragged item enters the drop target and optionally cancel the onDragEnter.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nisValid True if the drag event is valid, else false to cancel
\nAn empty function by default, but provided so that you can perform a custom action before the dragged\nitem is dragged out of the target without dropping, and optionally cancel the onDragOut.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nisValid True if the drag event is valid, else false to cancel
\nAn empty function by default, but provided so that you can perform a custom action\nwhile the dragged item is over the drop target and optionally cancel the onDragOver.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nisValid True if the drag event is valid, else false to cancel
\nAn empty function by default, but provided so that you can perform a custom action after an invalid\ndrop has occurred.
\nThe drop target
\nThe event object
\nThe id of the dragged element
\nisValid True if the invalid drop should proceed, else false to cancel
\nSaves the most recent position so that we can reset the constraints and\ntick marks on-demand. We need to know this so that we can calculate the\nnumber of pixels the element is offset from its original position.
\nthe current x position (optional, this just makes it so we\ndon't have to look it up again)
\nthe current y position (optional, this just makes it so we\ndon't have to look it up again)
\nClears any constraints applied to this instance. Also clears ticks\nsince they can't exist independent of a constraint at this time.
\nClears any tick interval defined for this instance
\nInitializes the drag drop object's constraints to restrict movement to a certain element.
\n\nUsage:
\n\n var dd = new Ext.dd.DDProxy(\"dragDiv1\", \"proxytest\",\n { dragElId: \"existingProxyDiv\" });\n dd.startDrag = function(){\n this.constrainTo(\"parent-id\");\n };\n
\n\n\nOr you can initalize it using the Ext.Element object:
\n\n Ext.get(\"dragDiv1\").initDDProxy(\"proxytest\", {dragElId: \"existingProxyDiv\"}, {\n startDrag : function(){\n this.constrainTo(\"parent-id\");\n }\n });\n
\n\nThe element to constrain to.
\nPad provides a way to specify \"padding\" of the constraints,\nand can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or\nan object containing the sides to pad. For example: {right:10, bottom:10}
\nConstrain the draggable in the content box of the element (inside padding and borders)
\nCreates the proxy element if it does not yet exist
\nFired when we are done dragging the object
\nthe mouseup event
\nThe provided implementation of the getDragData method which collects the data to be dragged from the GridPanel on mousedown.
\n\n\nThis data is available for processing in the onNodeEnter, onNodeOver,\nonNodeOut and onNodeDrop methods of a cooperating DropZone.
\n\n\nThe data object contains the following properties:
dragCell: true
, in which case, this will be\nan Array containing the single selected cell data as [rowIndex, cellIndex]
.Overrides: Ext.dd.DragZone.getDragData
Returns a reference to the actual element to drag. By default this is\nthe same as the html element, but it can be assigned to another\nelement. An example of this can be found in Ext.dd.DDProxy
\nthe html element
\nReturns a reference to the linked element
\nthe html element
\nReturns the drag source's underlying Ext.dd.StatusProxy
\nproxy The StatusProxy
\nAn empty implementation. Implement this to provide coordinates for the drag proxy to slide back to after an invalid drop.
\n\n\nCalled before a repair of an invalid drop to get the XY to animate to.
\n\nThe mouse up event
\nThe xy location (e.g. [100, 200])
\nOverrides: Ext.dd.DragZone.getRepairXY
Finds the location the element should be placed if we want to move\nit to where the mouse location less the click offset would place us.
\nthe X coordinate of the click
\nthe Y coordinate of the click
\nan object that contains the coordinates (Object.x and Object.y)
\nNormally the drag element is moved pixel by pixel, but we can specify\nthat it move a number of pixels at a time. This method resolves the\nlocation when we have it set up like this.
\nwhere we want to place the object
\nsorted array of valid points
\nthe closest tick
\nFired when this object is clicked
\nthe clicked dd object (this dd obj)
\nExecuted when the linked element is available
\nHides the drag source's Ext.dd.StatusProxy
\nSets up the DragDrop object. Must be called in the constructor of any\nExt.dd.DragDrop subclass
\nthe id of the linked element
\nthe group of related items
\nconfiguration attributes
\nInitialization for the drag frame element. Must be called in the\nconstructor of all subclasses
\nInitializes Targeting functionality only... the object does not\nget a mousedown handler.
\nthe id of the linked element
\nthe group of related items
\nconfiguration attributes
\nReturns true if this instance is locked, or the drag drop mgr is locked\n(meaning that all drag/drop is disabled on the page.)
\ntrue if this obj or all drag/drop is locked, else\nfalse
\nChecks the tag exclusion list to see if this click should be ignored
\nthe HTMLElement to evaluate
\ntrue if this is a valid tag type, false if not
\nOverride the onAvailable method to do what is needed after the initial\nposition was determined.
\nAn empty function by default, but provided so that you can perform a custom action before the initial\ndrag event begins and optionally cancel it.
\nAn object containing arbitrary data to be shared with drop targets
\nThe event object
\nisValid True if the drag event is valid, else false to cancel
\nAbstract method called during the onMouseMove event while dragging an\nobject.
\nthe mousemove event
\nAbstract method called when this item is dropped on another DragDrop\nobj
\nthe mouseup event
\nIn POINT mode, the element\nid this was dropped on. In INTERSECT mode, an array of dd items this\nwas dropped on.
\nAbstract method called when this element fist begins hovering over\nanother DragDrop obj
\nthe mousemove event
\nIn POINT mode, the element\nid this is hovering over. In INTERSECT mode, an array of one or more\ndragdrop items being hovered over.
\nAbstract method called when we are no longer hovering over an element
\nthe mousemove event
\nIn POINT mode, the element\nid this was hovering over. In INTERSECT mode, an array of dd items\nthat the mouse is no longer over.
\nAbstract method called when this element is hovering over another\nDragDrop obj
\nthe mousemove event
\nIn POINT mode, the element\nid this is hovering over. In INTERSECT mode, an array of dd items\nbeing hovered over.
\nThe provided implementation of the onInitDrag method. Sets the innerHTML of the drag proxy which provides the \"picture\"\nof the data being dragged.
\n\n\nThe innerHTML data is found by calling the owning GridPanel's getDragDropText.
\n\nOverrides: Ext.dd.DragZone.onInitDrag
Abstract method called when this item is dropped on an area with no\ndrop target
\nthe mouseup event
\nEvent handler that fires when a drag/drop obj gets a mousedown
\nthe mousedown event
\nEvent handler that fires when a drag/drop obj gets a mouseup
\nthe mouseup event
\nAn empty function by default, but provided so that you can perform a custom action once the initial\ndrag event has begun. The drag cannot be canceled from this function.
\nRemove's this instance from the supplied interaction group
\nThe group to drop
\nUnsets an invalid css class
\nthe class of the element(s) you wish to\nre-enable
\nUnsets an excluded tag name set by addInvalidHandleType
\nthe type of element to unexclude
\nresetConstraints must be called if you manually reposition a dd element.
\nSets the pointer offset. You can call this directly to force the\noffset to be in a particular location (e.g., pass in 0,0 to set it\nto the center of the object)
\nthe distance from the left
\nthe distance from the top
\nAllows you to specify that an element other than the linked element\nwill be moved with the cursor during a drag
\n{string} the id of the element that will be used to initiate the drag
\nSets the drag element to the location of the mousedown or click event,\nmaintaining the cursor location relative to the location on the element\nthat was clicked. Override this if you want to place the element in a\nlocation other than where the cursor is.
\nthe X coordinate of the mousedown or drag event
\nthe Y coordinate of the mousedown or drag event
\nAllows you to specify a child of the linked element that should be\nused to initiate the drag operation. An example of this would be if\nyou have a content div with text and links. Clicking anywhere in the\ncontent area would normally start the drag operation. Use this method\nto specify that an element inside of the content div is the element\nthat starts the drag operation.
\n{string} the id of the element that will be used to\ninitiate the drag.
\nStores the initial placement of the linked element.
\nthe X offset, default 0
\nthe Y offset, default 0
\nAllows you to set an element outside of the linked element as a drag\nhandle
\nthe id of the element that will be used to initiate the drag
\nConfigures the padding for the target zone in px. Effectively expands\n(or reduces) the virtual object size for targeting calculations.\nSupports css-style shorthand; if only one parameter is passed, all sides\nwill have that padding, and if only two are passed, the top and bottom\nwill have the first param, the left and right the second.
\nTop pad
\nRight pad
\nBot pad
\nLeft pad
\nSets the start position of the element. This is set when the obj\nis initialized, the reset when a drag is started.
\ncurrent position (from previous lookup)
\nBy default, the element can be dragged any place on the screen. Use\nthis method to limit the horizontal travel of the element. Pass in\n0,0 for the parameters if you want to lock the drag to the y axis.
\nthe number of pixels the element can move to the left
\nthe number of pixels the element can move to the\nright
\noptional parameter for specifying that the\nelement\nshould move iTickSize pixels at a time.
\nCreate the array of horizontal tick marks if an interval was specified\nin setXConstraint().
\nBy default, the element can be dragged any place on the screen. Set\nthis to limit the vertical travel of the element. Pass in 0,0 for the\nparameters if you want to lock the drag to the x axis.
\nthe number of pixels the element can move up
\nthe number of pixels the element can move down
\noptional parameter for specifying that the\nelement should move iTickSize pixels at a time.
\nCreate the array of vertical tick marks if an interval was specified in\nsetYConstraint().
\nResizes the drag frame to the dimensions of the clicked object, positions\nit over the object, and finally displays it
\nX click position
\nY click position
\nAbstract method called after a drag/drop object is clicked\nand the drag or mousedown time thresholds have beeen met.
\nclick location
\nclick location
\nRemove all drag and drop hooks for this element
\n