Drag-and-Drop Attributes

This section describes the responsibilities of each of the supported attribute.

drag-begin
The drag-begin attribute is responsible to tie a user-defined JavaScript method that can be used to initialize the beginning of the drag process. The method is triggered when a user starts the dragging process by pressing the mouse down on the element from the source object. Commonly, the method, during this particular moment, is used to identify the data (transferable data) that will be transferred along the dragging process. Identifying the transferable data is achieved by assigning the data object into the transferable object.

drag-exit
The drag-exit attribute is responsible to tie a user-defined JavaScript method that can be used to inform the user that the mouse movement has departed from the source component. The method is triggered when a user, during the dragging process, is exiting the source component area. drag-exit is only triggered once every time the mouse movement is exiting the source component area. This is assuming that the drag-begin has been registered and executed previously.

drag-enter

The drag-enter attribute is responsible to tie a user-defined JavaScript method that can be used to inform the user that the mouse movement has entered the targeted component. The method is triggered when a user, during the dragging process, is entering the target component area. drag-enter is only triggered once every time the mouse movement is entering the target component area. This is assuming that the drag-begin has been registered and executed previously.

drag-over
The drag-over attribute is responsible to tie a user-defined JavaScript method that can be used to inform user that the mouse movement is hovering above the targeted component. On contrary to drag-exit and drag-enter, method is constantly triggered on every single mouse movement once it is inside the targeted area. This is also assuming that the drag-begin has been registered and executed previously.

drag-drop
The drag-drop attribute is responsible to tie a user-defined JavaScript method that can be used to identify the end of the dragging process. It is commonly also commonly used to complete the process of transferring the data to the targeted component. The method is triggered when the mouse is released, ending the dragging process. The targeted component acts as a receiver and will consume the data. This is also assuming that the drag-begin has been registered and executed previously.

drag-complete
The drag-complete attribute is responsible to tie a user-defined JavaScript method that can be used to identify the completion of the whole drag and drop process. It commonly used to perform some clean up if necessary after drag-drop phase. The method is also triggered when the mouse is released, after the drag-drop phase is completed. This is also assuming that the drag-begin has been registered and executed previously.

Next: The DragDropEvent
Back to: Application Guide

 

 


COPYRIGHT © 1997–2006 JWAY GROUP, Inc.
All Rights Reserved. XUI is a registered trademark of JWAY GROUP, Inc.

All other designated trademarks and brands are properties of their respective owners.