1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    3
    Vote Rating
    0
    alex.barylski is on a distinguished road

      0  

    Default Unanswered: Custom drag source???

    Unanswered: Custom drag source???


    Hey all, picked up ext4 the other day started learning more about it. Stuck on how to implement custom drag and drop behaviors and rendering:

    Code:
    var panel = Ext.create('Ext.panel.Panel', {
      draggable: true, 
      title: 'Panel', 
      html: 'Show work orders', 
      listeners: {
        afterrender: function(){
          var proxy = Ext.create('Ext.dd.DDProxy'); 
          // TODO: How do I switch the drag proxy???
          //panel.dd.proxy = proxy; 
        }
      }
                });
    panel does not have a 'dd' property as I was expecting based on the examples and articles I have read.

    Can someone show me how, I would attach a new drag source (proxy) to a panel like I have indicated above...

    I currently want to override the default ghost image of the panel when being dragged to something a little more fancy but cannot even get started.


    Alex

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,010
    Answers
    382
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I haven't tried it myself, but I believe you'll need to override the panel's ghost() method which is what is used to create the ghost component used when dragging.
    http://docs.sencha.com/extjs/4.2.0/#...l-method-ghost

Thread Participants: 1

Tags for this Thread