Ext.ux.DataView.DragSelector.js 15.3 KB
Ext.data.JsonP.Ext_ux_DataView_DragSelector({"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.DragSelector","tagname":"property","name":"dataview","id":"property-dataview"},{"meta":{},"owner":"Ext.ux.DataView.DragSelector","tagname":"property","name":"dragRegion","id":"property-dragRegion"},{"meta":{},"owner":"Ext.ux.DataView.DragSelector","tagname":"property","name":"tracker","id":"property-tracker"}],"css_var":[],"method":[{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"cancelClick","id":"method-cancelClick"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"fillRegions","id":"method-fillRegions"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"getProxy","id":"method-getProxy"},{"meta":{},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"init","id":"method-init"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"onBeforeStart","id":"method-onBeforeStart"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"onDrag","id":"method-onDrag"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"onEnd","id":"method-onEnd"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"onRender","id":"method-onRender"},{"meta":{"private":true},"owner":"Ext.ux.DataView.DragSelector","tagname":"method","name":"onStart","id":"method-onStart"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":null,"html":"<div><pre class=\"hierarchy\"><h4>Requires</h4><div class='dependency'><a href='#!/api/Ext.dd.DragTracker' rel='Ext.dd.DragTracker' class='docClass'>Ext.dd.DragTracker</a></div><div class='dependency'><a href='#!/api/Ext.util.Region' rel='Ext.util.Region' class='docClass'>Ext.util.Region</a></div><h4>Files</h4><div class='dependency'><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector' target='_blank'>DragSelector.js</a></div></pre><div class='doc-contents'>\n</div><div class='members'><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>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-property-dataview' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-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 DataView bound to this instance</p>\n</div><div class='long'><p>The DataView bound to this instance</p>\n</div></div></div><div id='property-dragRegion' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-property-dragRegion' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-property-dragRegion' class='name expandable'>dragRegion</a><span> : <a href=\"#!/api/Ext.util.Region\" rel=\"Ext.util.Region\" class=\"docClass\">Ext.util.Region</a></span></div><div class='description'><div class='short'>Represents the region currently dragged out by the user. ...</div><div class='long'><p>Represents the region currently dragged out by the user. This is used to figure out which dataview nodes are\nin the selected area and to set the size of the Proxy element used to highlight the current drag area</p>\n</div></div></div><div id='property-tracker' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-property-tracker' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-property-tracker' class='name expandable'>tracker</a><span> : <a href=\"#!/api/Ext.dd.DragTracker\" rel=\"Ext.dd.DragTracker\" class=\"docClass\">Ext.dd.DragTracker</a></span></div><div class='description'><div class='short'>The DragTracker attached to this instance. ...</div><div class='long'><p>The DragTracker attached to this instance. Note that the 4 on* functions are called in the scope of the\nDragTracker ('this' refers to the DragTracker inside those functions), so we pass a reference to the\nDragSelector so that we can call this class's functions.</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-cancelClick' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-cancelClick' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-cancelClick' class='name expandable'>cancelClick</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Reusable handler that's used to cancel the container click event when dragging on the dataview. ...</div><div class='long'><p>Reusable handler that's used to cancel the container click event when dragging on the dataview. See onStart for\ndetails</p>\n</div></div></div><div id='method-fillRegions' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-fillRegions' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-fillRegions' class='name expandable'>fillRegions</a>( <span class='pre'></span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Gets the region taken up by each rendered node in the DataView. ...</div><div class='long'><p>Gets the region taken up by each rendered node in the DataView. We use these regions to figure out which nodes\nto select based on the selector region the user has dragged out</p>\n</div></div></div><div id='method-getProxy' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-getProxy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-getProxy' class='name expandable'>getProxy</a>( <span class='pre'></span> ) : <a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a><strong class='private signature'>private</strong></div><div class='description'><div class='short'>Creates a Proxy element that will be used to highlight the drag selection region ...</div><div class='long'><p>Creates a Proxy element that will be used to highlight the drag selection region</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Ext.dom.Element\" rel=\"Ext.dom.Element\" class=\"docClass\">Ext.Element</a></span><div class='sub-desc'><p>The Proxy element</p>\n</div></li></ul></div></div></div><div id='method-init' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-init' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-init' class='name expandable'>init</a>( <span class='pre'><a href=\"#!/api/Object\" rel=\"Object\" class=\"docClass\">Object</a> dataview</span> )</div><div class='description'><div class='short'>Initializes the plugin by setting up the drag tracker ...</div><div class='long'><p>Initializes the plugin by setting up the drag tracker</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>dataview</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-onBeforeStart' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-onBeforeStart' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-onBeforeStart' class='name expandable'>onBeforeStart</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'>Listener attached to the DragTracker's onBeforeStart event. ...</div><div class='long'><p>Listener attached to the DragTracker's onBeforeStart event. Returns false if the drag didn't start within the\nDataView's el</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-onDrag' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-onDrag' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-onDrag' class='name expandable'>onDrag</a>( <span class='pre'><a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a> e</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Listener attached to the DragTracker's onDrag event. ...</div><div class='long'><p>Listener attached to the DragTracker's onDrag event. Figures out how large the drag selection area should be and\nupdates the proxy element's size to match. Then iterates over all of the rendered items and marks them selected\nif the drag region touches them</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The drag event</p>\n</div></li></ul></div></div></div><div id='method-onEnd' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-onEnd' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-onEnd' class='name expandable'>onEnd</a>( <span class='pre'><a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a> e</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Listener attached to the DragTracker's onEnd event. ...</div><div class='long'><p>Listener attached to the DragTracker's onEnd event. This is a delayed function which executes 1\nmillisecond after it has been called. This is because the dragging flag must remain active to cancel\nthe containerclick event which the mouseup event will trigger.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The event object</p>\n</div></li></ul></div></div></div><div id='method-onRender' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-onRender' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-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. This sets up the DragTracker instance that will be used\nto created a dragged selection area</p>\n</div></div></div><div id='method-onStart' class='member  not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.ux.DataView.DragSelector'>Ext.ux.DataView.DragSelector</span><br/><a href='source/DragSelector.html#Ext-ux-DataView-DragSelector-method-onStart' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.ux.DataView.DragSelector-method-onStart' class='name expandable'>onStart</a>( <span class='pre'><a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a> e</span> )<strong class='private signature'>private</strong></div><div class='description'><div class='short'>Listener attached to the DragTracker's onStart event. ...</div><div class='long'><p>Listener attached to the DragTracker's onStart event. Cancel's the DataView's containerclick event from firing\nand sets the start co-ordinates of the Proxy element. Clears any existing DataView selection</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>e</span> : <a href=\"#!/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a><div class='sub-desc'><p>The click event</p>\n</div></li></ul></div></div></div></div></div></div></div>","subclasses":[],"name":"Ext.ux.DataView.DragSelector","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"DragSelector.html#Ext-ux-DataView-DragSelector","filename":"DragSelector.js"}],"html_meta":{"author":null},"singleton":false,"id":"class-Ext.ux.DataView.DragSelector","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":["Ext.dd.DragTracker","Ext.util.Region"]});