PDA

View Full Version : Ext.dd.DragDropManager sorting drop targets by z-order



jvs10000
14 Nov 2012, 1:31 PM
I'm in the process of porting my application from Ext 3.x to Ext 4.x. I have an interactive dashboard designer which uses drag/drop to nests containers inside each other.

Each of the containers has a DropZone. In 3.x the top most container DropZone would indicate it was a valid drop target.

In 4.x, my top most container's DropZone is never getting called. I have tracked this down to a boolean attribute in the Ext.dd.DragDropManager - notifyOccluded. According to the documentation, the behavior is the top most target in the z-order should be notified unless notifyOccluded is set to true.

What I am observing is the exact opposite - The bottom most container in the z-order is getting called and none other.

Digging a bit more - it appears the array of drop targets is not being sorted by z order (the "needsSort" boolean is undefined) in the fireEvents function of Ext.dd.DragDropManager.

I'm not certain of the logic that is coded to ensure the drop targets should be sorted.

I would appreciate guidance on how I should configure my DropZone's to have the top most item in the z-order notified.

Thanks,
- jvs10000