1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    6
    Vote Rating
    0
    Answers
    1
    firblazer is on a distinguished road

      0  

    Default Unanswered: How to use Draggable and Resizable?

    Unanswered: How to use Draggable and Resizable?


    Hi!

    I want to make a drawComponent resizable and draggable. Here is my code:

    Code:
    var drawComponent = Ext.create('Ext.draw.Component', {
            viewBox: false,
            items: [{
                type: 'rect',
                fill: '#79BB3F',
                x: 100,
                y: 100,
                width: 100,
                height: 100,
                resizable: {pinned: true, dynamic: true,handles: 'all'}
            }],
            draggable: {}        
        });
        
    
        var areas = Ext.create('Ext.panel.Panel', {
            width: 1000,
            height: 500,
            layout: 'fit',
            items: [drawComponent]
        });
    But it is only draggable, not resizable. Please help, Thanks.

  2. #2
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    654
    Vote Rating
    26
    Answers
    21
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    Regarding draggable here:
    Code:
    var drawComponent = Ext.create('Ext.draw.Component', {
        viewBox: false,
                draggable: true,
        items: [{
            type: 'circle',
            fill: '#79BB3F',
            radius: 10,
            x: 10,
            y: 10
        }]
    });
    
    
    Ext.create('Ext.Window', {
        width: 215,
        height: 235,
        layout: 'fit',
        items: [drawComponent]
    }).show();
    as regarding resize, is more complicated and depends how you want to resize, look if you find sth useful here, it's for SVG: http://www.sencha.com/forum/showthre...612#post887612

Thread Participants: 1

Tags for this Thread