You found a bug! We've classified it as EXTJS-9155 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    3
    Vote Rating
    0
    greatranil is on a distinguished road

      0  

    Default Sprite draggbel not working

    Sprite draggbel not working


    With the version 4.2 sprite can not be set as draggble,
    see the code below.

    Code:
    Ext.create('Ext.draw.Component', {
        renderTo: Ext.getBody(),
        width: 200,
        height: 200,
        items: [{
            type: 'circle',
            radius: 90,
            draggable:true,
            x: 100,
            y: 100,
            fill: 'blue'
        }]
    });
    This was work fine before 4.2.
    Any idea?

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

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Location
    Northern Ireland
    Posts
    58
    Vote Rating
    2
    Frith is on a distinguished road

      0  

    Default Related issue - draggable: false and sprite.el.on

    Related issue - draggable: false and sprite.el.on


    See the following code:

    PHP Code:
    sp surface.add({            
        
    type'path',            
        
    path'm 56,56 150,0 75,-75 -75,-75 -150,0 z',            
        
    fill'#F44',            
        
    draggablefalse        
    });                                

    sp.el.on('contextmenu', function(eteOpts){            
        
    e.stopEvent();            
        
    mnu Ext.create('Ext.menu.Menu', {
                                
    width100,
                                
    margin'0 0 10 0',
                                
    floatingtrue,  
                                
    items: [{
                                    
    text'regular item 1'
                                
    },{ 
                                   
    text'regular item 2'
                                
    },{
                                    
    text'regular item 3'
                                
    }]
                            });
                            
    mnu.showAt(e.browserEvent.clientX,e.browserEvent.clientY);
            }); 
    As per the previous post, when setting draggable to true, the sprite is draggable in 4.1 but not 4.2.

    In addition, if you set draggable = false in 4.1, the listener for contextmenu fails with 'Cannot call method on of undefined' whereas draggable = true allows you to capture the contextmenu event as desired.

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    21
    Vote Rating
    2
    hlurger is on a distinguished road

      0  

    Default


    Workarounds??

    It is still the same in ext js 5 (package: ext-charts)

Thread Participants: 3

Tags for this Thread