views:

524

answers:

1

This is a two-part problem:

A) I'm implementing several irregular drag-drop operations in Flex (e.g. DataGrid ItemRenderer into Tree). My preference was modifying DragManager operations to meet my needs, and in fact using DragManager allows me to do everything I need, but I'm having serious issues with performance. For example, dragging anything over a many-columned DataGrid, whether the drag was initiated with DragManager.doDrag, or just using native ListBase drag-drop functionality, slows the drag movement to a crawl. Even if the DataGrid is disabled/ not listenening for any move/drag events, this happens. On the other hand, if the drag is initiated by calling .startDrag() on the Sprite, the drag is smooth and performs great over DataGrids and everything else. So part A would be: Is there a reason why .startDrag() operations work so well, while drags initiated through DragManager.doDrag suffer so badly when over certain components?

B) If indeed the solution is to handle drag-drops using .startDrag(), how would I go about determining what component the mouse is over when the drag is released? In my example, my dragged object is brought up to the top level of the display list, and so is being moved around in stage coordinates. mouseMove, mouseOver events don't fire on the components I'm dragging over because the mouse is constantly over the dragged component, so I would need some sort of stage.coordinate -> visibleComponentAtThatCoordinate conversion. Any thoughts on this?

Thanks alot!-- Yarin

A: 

Hi

Long time no answer, ay? Here are my few cents:

A) I am experiencing the same slowness on my machine (the drag sometimes freezes for up to a whole second), however, the same code runs very smoothly on everybody else's PC here in the office.

B) Maybe this discussion especially the code at the bottom helps http://stackoverflow.com/questions/1789926/flex-datagrid-how-to-obtain-item-for-mouse-x-y-coordinates

Tom
Thanks for the response Tom- honestly it's been so long I can't say how I ended up dealing with this..
Yarin