Ext.ux.DataView.Draggable.js
13 KB
Ext.data.JsonP.Ext_ux_DataView_Draggable({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{"author":["Ed Spencer"]},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":[],"members":{"event":[],"property":[{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"property","name":"dataview","id":"property-dataview"},{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"property","name":"dragZone","id":"property-dragZone"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"Ext.ux.DataView.Draggable","tagname":"method","name":"createGhost","id":"method-createGhost"},{"meta":{"private":true},"owner":"Ext.ux.DataView.Draggable","tagname":"method","name":"getRepairXY","id":"method-getRepairXY"},{"meta":{"private":true},"owner":"Ext.ux.DataView.Draggable","tagname":"method","name":"onRender","id":"method-onRender"},{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"method","name":"prepareGhost","id":"method-prepareGhost"}],"css_mixin":[],"cfg":[{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"cfg","name":"ddConfig","id":"cfg-ddConfig"},{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"cfg","name":"ghostCls","id":"cfg-ghostCls"},{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"cfg","name":"ghostConfig","id":"cfg-ghostConfig"},{"meta":{},"owner":"Ext.ux.DataView.Draggable","tagname":"cfg","name":"ghostTpl","id":"cfg-ghostTpl"}]},"tagname":"class","extends":null,"html":"<div><pre class=\"hierarchy\"><h4>Requires</h4><div class='dependency'><a href='#!/api/Ext.dd.DragZone' rel='Ext.dd.DragZone' class='docClass'>Ext.dd.DragZone</a></div><h4>Files</h4><div class='dependency'><a href='source/Draggable.html#Ext-ux-DataView-Draggable' target='_blank'>Draggable.js</a></div></pre><div class='doc-contents'><pre><code><a href=\"#!/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a>('<a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a>', {\n mixins: {\n draggable: '<a href=\"#!/api/Ext.ux.DataView.Draggable\" rel=\"Ext.ux.DataView.Draggable\" class=\"docClass\">Ext.ux.DataView.Draggable</a>'\n },\n\n initComponent: function() {\n this.mixins.draggable.init(this, {\n ddConfig: {\n ddGroup: 'someGroup'\n }\n });\n\n this.callParent(arguments);\n }\n});\n</code></pre>\n\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-ddConfig' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-cfg-ddConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-cfg-ddConfig' class='name not-expandable'>ddConfig</a><span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a></span></div><div class='description'><div class='short'><p>Config object that is applied to the internally created DragZone</p>\n</div><div class='long'><p>Config object that is applied to the internally created DragZone</p>\n</div></div></div><div id='cfg-ghostCls' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-cfg-ghostCls' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-cfg-ghostCls' class='name expandable'>ghostCls</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'>The CSS class added to the outermost element of the created ghost proxy\n(defaults to 'x-dataview-draggable-ghost') ...</div><div class='long'><p>The CSS class added to the outermost element of the created ghost proxy\n(defaults to 'x-dataview-draggable-ghost')</p>\n<p>Defaults to: <code>"x-dataview-draggable-ghost"</code></p></div></div></div><div id='cfg-ghostConfig' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-cfg-ghostConfig' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-cfg-ghostConfig' class='name not-expandable'>ghostConfig</a><span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span></div><div class='description'><div class='short'><p>Config object that is used to configure the internally created DataView</p>\n</div><div class='long'><p>Config object that is used to configure the internally created DataView</p>\n</div></div></div><div id='cfg-ghostTpl' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-cfg-ghostTpl' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-cfg-ghostTpl' class='name expandable'>ghostTpl</a><span> : <a href=\"#!/api/Ext.XTemplate\" rel=\"Ext.XTemplate\" class=\"docClass\">Ext.XTemplate</a>/<a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a></span></div><div class='description'><div class='short'>The template used in the ghost DataView ...</div><div class='long'><p>The template used in the ghost DataView</p>\n<p>Defaults to: <code>["<tpl for=".">", "{title}", "</tpl>"]</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-dataview' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-property-dataview' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-property-dataview' class='name not-expandable'>dataview</a><span> : <a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a></span></div><div class='description'><div class='short'><p>The <a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a> instance that this DragZone is attached to</p>\n</div><div class='long'><p>The <a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a> instance that this DragZone is attached to</p>\n</div></div></div><div id='property-dragZone' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-property-dragZone' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-property-dragZone' class='name not-expandable'>dragZone</a><span> : <a href=\"#!/api/Ext.dd.DragZone\" rel=\"Ext.dd.DragZone\" class=\"docClass\">Ext.dd.DragZone</a></span></div><div class='description'><div class='short'><p>The attached DragZone instane</p>\n</div><div class='long'><p>The attached DragZone instane</p>\n</div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-createGhost' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-method-createGhost' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-method-createGhost' class='name expandable'>createGhost</a>( <span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> records</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Creates the 'ghost' DataView that follows the mouse cursor during the drag operation. ...</div><div class='long'><p>Creates the 'ghost' DataView that follows the mouse cursor during the drag operation. This div is usually a\nlighter-weight representation of just the nodes that are selected in the parent DataView.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>records</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-getRepairXY' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-method-getRepairXY' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-method-getRepairXY' class='name expandable'>getRepairXY</a>( <span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> e</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Returns the x and y co-ordinates that the dragged item should be animated back to if it was dropped on an\ninvalid dro...</div><div class='long'><p>Returns the x and y co-ordinates that the dragged item should be animated back to if it was dropped on an\ninvalid drop target. If we're dragging more than one item we don't animate back and just allow afterRepair\nto frame each dropped item.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-onRender' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-method-onRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-method-onRender' class='name expandable'>onRender</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Called when the attached DataView is rendered. ...</div><div class='long'><p>Called when the attached DataView is rendered. Sets up the internal DragZone</p>\n</div></div></div><div id='method-prepareGhost' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.Draggable'>Ext.ux.DataView.Draggable</span><br/><a href='source/Draggable.html#Ext-ux-DataView-Draggable-method-prepareGhost' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.Draggable-method-prepareGhost' class='name expandable'>prepareGhost</a>( <span class='pre'><a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a> records</span> ) : <a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a></div><div class='description'><div class='short'>Updates the internal ghost DataView by ensuring it is rendered and contains the correct records ...</div><div class='long'><p>Updates the internal ghost DataView by ensuring it is rendered and contains the correct records</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>records</span> : <a href=\"#!/api/Array\" rel=\"Array\" class=\"docClass\">Array</a><div class='sub-desc'><p>The set of records that is currently selected in the parent DataView</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.view.View\" rel=\"Ext.view.View\" class=\"docClass\">Ext.view.View</a></span><div class='sub-desc'><p>The Ghost DataView</p>\n</div></li></ul></div></div></div></div></div></div></div>","subclasses":[],"name":"Ext.ux.DataView.Draggable","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"Draggable.html#Ext-ux-DataView-Draggable","filename":"Draggable.js"}],"html_meta":{"author":null},"singleton":false,"id":"class-Ext.ux.DataView.Draggable","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":["Ext.dd.DragZone"]});