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

      0  

    Default


    One additional question.
    I am also going to need to drag from the embed to the main page. I can use code within the embed to call a hook to initiate a drag, but to do so I need to know how to artificially initiate a drag (without a linked element...I want to call a function programmatically and attach my own proxy to be dragged within that function).
    The embed knows where and when a drag is valid (and what data that drag represents), the page cannot know this.

  2. #12
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I don't think it's possible. They are probably using a completely separate object model. But then I don't know what you are using.

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

      0  

    Default


    1. I control the code in the embed. It is a customized svg doc.
    2. the object model is completely different.
    3. I can write code within the embed to make javascript calls into the main page. Within the embeds context, I know when to start a drag.
    4. Ext can control the drag complely once I start it. I will provide the Proxy for it to drag that will live in the context of the main page.

    Thus, the key to all of this is that I need to be able to programmatically enter the 'dragging' state. I need to skip the drag detection state and do this without a real drag source (or with a 'pretend' source).

    I've been considering having the embed call the page to place a small 'mask' under the mouse when I'm over one of the embeds valid drag targets. The mask would have to forward it's mouse calls to the underlying embed, so that it could be removed when I am no longer over a valid drag item.

    That's my backup anyways if I can't figure out a way to artifically enter the 'dragging' state through a function call from the embed into the main page.

    any thoughts, recomendations?

    or am I up the wrong tree again :P
    Last edited by harmomelodic; 30 Sep 2010 at 11:41 AM. Reason: grammer

  4. #14
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    If the object is scriptable, then you can create a DragZone out of it.

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

      0  

    Default


    There is a bit of a chicken and egg problem here.
    I can add a dragzone, but how is it going to get the mouse interactions over the embed in the context of the whole page? Thats why we has to use the mask after all...
    I think I am back to two choices...
    1. figure out how to artifically initiate a drag for the dragzone from inside the context of the embed.
    2. leave the mask over the embed all the time. Forward mouse events into the embed as appropriate, adjusting for the x-y position of the events either withing the embeds code or by modifying the event.

    Other ideas? Do these seem possible/advisable?

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

      0  

    Default


    Approach #2 seems to mostly work, except the behavior when I am not returning data (getDragData returning undefined) isn't quite right. Instead of not entering the drag state at all, it enters a state where the Ext drag code starts capturing the mouse events. I need a failed drag to be completely failed so that it does other behavior in the embed when it is not on a valid drag spot.
    I'm currently trying to figure out the best/simplest way to correct this behavior...thoughts are appreciated.
    Thanks

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

      0  

    Default


    This is driving me crazy.
    stopPropagation = false doesn't even work.
    I've been spending enless amounts of time in firebug setting breakpoints, trying to figure out where this behavior is happening. Everything in DragZone, DragDropMgr, DragSource seems to say that a drag isn't happening. However, When I drag an invalid target within the dragzone the cursor changes to the do-not-enter symbol and events stop being propagated into the masking div (and thus the embed). When I unclick the embed sees events again. So, the embed gets the initial mousedown, then gets mousemoves after the mouseup.
    The embed has dragging type behavior, and I want that to happen only on invalid drag targets.

    If anybody has any idea where these events are getting blocked, or how to trace it out (where is that cursor being set?) please help...

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

      0  

    Default


    p.s. draggin on valid drag targets is working AOK.

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

      0  

    Default


    it does not look like the ext drag not allowed symbol, rather it looks like the standard cursor:not-allowed css setting...

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

      0  

    Default


    I'm starting to think this might be a strange browser issue...
    I try this in chrome and it works...the only caveat is I get the alpha entry cursor...but the functionality is exactly what it should be!

    #$T^@$%!%$@

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