I am using DDProxy to drag an icon around. When I am dragging the icon over the toolbar, it works fine, but when I drag it over an embedded graph <embed src= et. /> I 'lose' the icon and it hangs (the icon, not the browser). Interestingly, this is related to the direction of the drag and the positioning of the mouse over the proxy el. I.e. if I setDelta(middle, middle) in my startDrag override, it becomes far less sensitive to losing the icon. When I setDelta() to the corner of the proxy it becomes extremely sensitive (and that is unfortunately what I need).
I suspect the onMouseMove code within my embed is interfering with the dragging code...and that it is a timing issue. Unfortunately my intention is to make the onMouseMove code more complicated, not less (I'm adding some fairly complex functionality to an already complex page).
Any thoughts on how I can workaround this problem would be appreciated.
The embed does live within an ext panel, if that helps at all...
So I think I know 'how' to fix this, but I'm not sure how to implement it.
The embed seems to play havok with mousemove type events. I tried to move all the onmousemove code to the container that encapsulates the embed (container_var.getEl.addListener('mousemove', function), and it performed terribly (the event would fire intermittently only when crossing container boundaries).
My thinking here is I should turn this around and override the DDProxy mousemove event handler so that the embed code is calling it when I'm in the embed.
My question....how do I do this? How do I manually capture and forward the mousemove events to DDProxy when in the embed, but let Ext do it when not in the embed?
Thanks...
I'm calling a delegate of ext.dd.DragDropMgr.handleMouseMove(evt).
However, it expects an Ext wrapped event, not a browser event.
Is there a way I can easily wrap this...a browser event->ext event converter???
It appears Ext.EventObject.setEvent(browserevent) will do this.
Now a related problem crops up...the value for clientY in the onmousemove event for the embed is relative to the embed, not the document. I cannot set a getter...so I'm not sure what the best way to deal with this is...make a writable copy of the event? Is their an easier way?
If I do make a copy (new Object(browserevent)) I get the strange error...too much recursion. I guess the object is way too deep.
Any thoughts on how to correct for the misplacement of the y axis in the embed's onmousemove?
I feel like I'm really close here. The dragged icon does not get lost over the embed anymore (it doesn't hang), rather it is just offset by the size of the toolbar (or double it)..........
I'm looking for a place to override the code that 'pulls' the proxy element back under the mouse so that I can add an offset to the event that I can look for in that code.
Where does this code live? I'm searching and having some trouble finding it...