0 Replies Latest reply on Nov 24, 2006 9:28 AM by as3isolib

    mx:Container dragEvents & scroll location

      I have created a system for drag&drop functionality for non-list-based classes. There are 3 classes altogther (UICDragManager, UICDragEvent & DragDropBox). The DragDropBox is basically a subclass of the mx:Box with some built in listeners and eventDispatchers that talks to the UICDragManager class. This system works great until you involve scrolling (in this case, at the Application.application level).

      Let us say I have 3 dragDropBox instances on the screen. ddb#3 has a y value of 100. Assume there is no scolled content at the application level. When I grab a child of ddb#3, and move the mouse upwards past ddb#3's top border, ddb3 fires its dragExit event as expected.

      Now assume that I have a very tall bit of content at the application level. The verticalScrollPosition of my application is say 50. For clarity, we should note that even though ddb3's y position is still 100 in in the context of its parent, globally speaking it is now 50 relative to the application. Now I grab the same child from ddb3 and move upwards again. Due to the scrolling, ddb3's dragExit event doesn't fire until some point 'North' of its top boundry. Though very hard to aproximate, it looks as though it is firing about the same distance above as the offset from the scrolling.