X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.tree.ViewDDPlugin.html diff --git a/docs/api/Ext.tree.ViewDDPlugin.html b/docs/api/Ext.tree.ViewDDPlugin.html new file mode 100644 index 00000000..7e256a04 --- /dev/null +++ b/docs/api/Ext.tree.ViewDDPlugin.html @@ -0,0 +1,211 @@ +Ext.tree.ViewDDPlugin | Ext JS 4.0 Documentation +
For up to date documentation and features, visit +http://docs.sencha.com/ext-js/4-0

Sencha Documentation

+ + + + + +

Hierarchy

Ext.AbstractPlugin
Ext.tree.ViewDDPlugin

This plugin provides drag and/or drop functionality for a TreeView.

+ + +

It creates a specialized instance of DragZone which knows how to drag out of a TreeView +and loads the data object which is passed to a cooperating DragZone's methods with the following properties:

    +
  • copy : Boolean +
    The value of the TreeView's copy property, or true if the TreeView was configured + with allowCopy: true and the control key was pressed when the drag operation was begun.
  • +
  • view : TreeView +
    The source TreeView from which the drag originated.
  • +
  • ddel : HtmlElement +
    The drag proxy element which moves with the mouse
  • +
  • item : HtmlElement +
    The TreeView node upon which the mousedown event was registered.
  • +
  • records : Array +
    An Array of Models representing the selected data being dragged from the source TreeView.
  • +

+ + +

It also creates a specialized instance of Ext.dd.DropZone which cooperates with other DropZones which are members of the same +ddGroup which processes such data objects.

+ + +

Adding this plugin to a view means that two new events may be fired from the client TreeView, beforedrop and +drop

+ +
Defined By

Config Options

Other Configs

 

True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)

+

True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)

+
 
Allow inserting a dragged node between an expanded parent node and its first child that will become a +sibling of the ...

Allow inserting a dragged node between an expanded parent node and its first child that will become a +sibling of the parent when dropped (defaults to false)

+
 

True if the tree should only allow append drops (use for trees which are sorted, defaults to false)

+

True if the tree should only allow append drops (use for trees which are sorted, defaults to false)

+
 
A named drag drop group to which this object belongs. If a group is specified, then both the DragZones and DropZone +...

A named drag drop group to which this object belongs. If a group is specified, then both the DragZones and DropZone +used by this plugin will only interact with other drag drop objects in the same group (defaults to 'TreeDD').

+
 
The ddGroup to which the DragZone will belong. + + +This defines which other DropZones the DragZone will interact with. ...

The ddGroup to which the DragZone will belong.

+ + +

This defines which other DropZones the DragZone will interact with. Drag/DropZones only interact with other Drag/DropZones +which are members of the same ddGroup.

+ +
 
The ddGroup to which the DropZone will belong. + + +This defines which other DragZones the DropZone will interact with. ...

The ddGroup to which the DropZone will belong.

+ + +

This defines which other DragZones the DropZone will interact with. Drag/DropZones only interact with other Drag/DropZones +which are members of the same ddGroup.

+ +
 

Defaults to true

+ + +

Set to false to disallow dragging items from the View

+ +

Defaults to true

+ + +

Set to false to disallow dragging items from the View

+ +
 

Defaults to true

+ + +

Set to false to disallow the View from accepting drop gestures

+ +

Defaults to true

+ + +

Set to false to disallow the View from accepting drop gestures

+ +
 
The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node +over the target...

The delay in milliseconds to wait before expanding a target tree node while dragging a droppable node +over the target (defaults to 1000)

+
 
The color to use when visually highlighting the dragged +or dropped node (defaults to 'c3daf9' - light blue). The colo...

The color to use when visually highlighting the dragged +or dropped node (defaults to 'c3daf9' - light blue). The color must be a 6 digit hex value, without +a preceding '#'. See also nodeHighlightOnDrop and nodeHighlightOnRepair.

+
 
Whether or not to highlight any nodes after they are +successfully dropped on their target. Defaults to the value of E...

Whether or not to highlight any nodes after they are +successfully dropped on their target. Defaults to the value of Ext.enableFx. +See also nodeHighlightColor and nodeHighlightOnRepair.

+
 
Whether or not to highlight any nodes after they are +repaired from an unsuccessful drag/drop. Defaults to the value o...

Whether or not to highlight any nodes after they are +repaired from an unsuccessful drag/drop. Defaults to the value of Ext.enableFx. +See also nodeHighlightColor and nodeHighlightOnDrop.

+
Defined By

Properties

 
The destroy method is invoked by the owning Component at the time the Component is being destroyed. +Use this method t...

The destroy method is invoked by the owning Component at the time the Component is being destroyed. +Use this method to clean up an resources.

+
 

The init method is invoked after initComponent has been run for the +component which we are injecting the plugin into.

+

The init method is invoked after initComponent has been run for the +component which we are injecting the plugin into.

+
Defined By

Methods

 

Disable the plugin and set the disabled flag to true.

+

Disable the plugin and set the disabled flag to true.

+

Returns

  • void    +
 

Enable the plugin and set the disabled flag to false.

+

Enable the plugin and set the disabled flag to false.

+

Returns

  • void    +
Defined By

Events

 
beforedrop( +HtmlElement node, Object data, Ext.data.Model overModel, String dropPosition, Function dropFunction) +
This event is fired through the TreeView. Add listeners to the TreeView object + + +Fired when a drop gesture has been t...

This event is fired through the TreeView. Add listeners to the TreeView object

+ + +

Fired when a drop gesture has been triggered by a mouseup event in a valid drop position in the TreeView. + +

Parameters

  • node : HtmlElement

    The TreeView node if any over which the mouse was positioned.

    + +

    Returning false to this event signals that the drop gesture was invalid, and if the drag proxy +will animate back to the point from which the drag began.

    + + +

    Returning 0 To this event signals that the data transfer operation should not take place, but +that the gesture was valid, and that the repair operation should not take place.

    + + +

    Any other return value continues with the data transfer operation.

    + +
  • data : Object

    The data object gathered at mousedown time by the cooperating DragZone's +getDragData method it contains the following properties:

      +
    • copy : Boolean +
      The value of the TreeView's copy property, or true if the TreeView was configured + with allowCopy: true and the control key was pressed when the drag operation was begun
    • +
    • view : TreeView +
      The source TreeView from which the drag originated.
    • +
    • ddel : HtmlElement +
      The drag proxy element which moves with the mouse
    • +
    • item : HtmlElement +
      The TreeView node upon which the mousedown event was registered.
    • +
    • records : Array +
      An Array of Models representing the selected data being dragged from the source TreeView.
    • +

    +
  • overModel : Ext.data.Model

    The Model over which the drop gesture took place.

    +
  • dropPosition : String

    "before", "after" or "append" depending on whether the mouse is above or below the midline of the node, +or the node is a branch node which accepts new child nodes.

    +
  • dropFunction : Function

    A function to call to complete the data transfer operation and either move or copy Model instances from the source +View's Store to the destination View's Store.

    + + +

    This is useful when you want to perform some kind of asynchronous processing before confirming +the drop, such as an confirm call, or an Ajax request.

    + + +

    Return 0 from this event handler, and call the dropFunction at any time to perform the data transfer.

    + +
 
drop( +HtmlElement node, Object data, Ext.data.Model overModel, String dropPosition) +
This event is fired through the TreeView. Add listeners to the TreeView object +Fired when a drop operation has been c...

This event is fired through the TreeView. Add listeners to the TreeView object +Fired when a drop operation has been completed and the data has been moved or copied.

+

Parameters

  • node : HtmlElement

    The TreeView node if any over which the mouse was positioned.

    +
  • data : Object

    The data object gathered at mousedown time by the cooperating DragZone's +getDragData method it contains the following properties:

      +
    • copy : Boolean +
      The value of the TreeView's copy property, or true if the TreeView was configured + with allowCopy: true and the control key was pressed when the drag operation was begun
    • +
    • view : TreeView +
      The source TreeView from which the drag originated.
    • +
    • ddel : HtmlElement +
      The drag proxy element which moves with the mouse
    • +
    • item : HtmlElement +
      The TreeView node upon which the mousedown event was registered.
    • +
    • records : Array +
      An Array of Models representing the selected data being dragged from the source TreeView.
    • +

    +
  • overModel : Ext.data.Model

    The Model over which the drop gesture took place.

    +
  • dropPosition : String

    "before", "after" or "append" depending on whether the mouse is above or below the midline of the node, +or the node is a branch node which accepts new child nodes.

    +
\ No newline at end of file