Hybrid View

  1. #1
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Question Losing drag proxy in embed...mouse speed related.

    Losing drag proxy in embed...mouse speed related.


    Howdy. Thanks in advance for your help.

    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...

  2. #2
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Default


    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...

  3. #3
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Default


    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???

  4. #4
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Default


    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?

  5. #5
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Default


    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)..........

    Sigh...

  6. #6
    Ext User
    Join Date
    Oct 2009
    Posts
    72
    Vote Rating
    0
    harmomelodic is on a distinguished road

      0  

    Default


    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...

Similar Threads

  1. Replies: 4
    Last Post: 20 May 2010, 12:46 AM
  2. Drag Proxy vs. Mouse location
    By gtomalesky in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 28 Oct 2008, 2:27 PM
  3. graphical dd proxy under the mouse cursor
    By zen in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Aug 2008, 2:52 AM
  4. drag-proxy
    By yazan_rababa in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 1 Jun 2008, 4:53 AM
  5. Custom Mouse Selection Proxy Box Help (jQuery)
    By xtrafile in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 16 Jul 2007, 7:01 PM

Thread Participants: 1