1. #11
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    please publish your example here.

  2. #12
    Sencha User
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
    frederict is on a distinguished road

      0  

    Default


    Hi,
    You'll find here the modification (in bold) I made in the demo code

    app/controller/Main.js
    ----------------------
    onDragStart: function() {
    var me = this;
    this.getDraggsCnt().getScrollable().getScroller().setDisabled(true);
    console.log('Start dragging', arguments);
    },

    onDragEnd: function() {
    this.getDraggsCnt().getScrollable().getScroller().setDisabled(false);
    console.log('End of dragging', arguments);
    },

    app/view/Main.js
    ----------------
    id: 'draggsCnt',
    xtype: 'container',

    layout: {
    type: 'hbox',
    align: 'center'
    },
    scrollable: true,
    width:100,
    height: 40,


    Tell me if you can reproduce the problem.
    Regards,
    Frederic

  3. #13
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    yes, it seems you can not drag from scrollable container.
    You can try ontouchstart event cut your object from draggsCnt (or create clone) and paste it into Ext.Viewport with floating style and same position, and then ontouchmove event initialize draggable on your cloned object.

  4. #14
    Sencha User
    Join Date
    May 2011
    Location
    bangalore
    Posts
    7
    Vote Rating
    0
    loveferoz is on a distinguished road

      0  

    Default


    Hey guyz i'm facing a prob , is it possible to drag and drop in same container or toolbar for instance. appreciated if answered ,thanx in advanz

  5. #15
    Sencha User
    Join Date
    Mar 2011
    Location
    Philadelphia
    Posts
    30
    Vote Rating
    3
    dgotty is on a distinguished road

      0  

    Default


    Awesome thanks a bunch!!!!!

  6. #16
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    Quote Originally Posted by loveferoz View Post
    Hey guyz i'm facing a prob , is it possible to drag and drop in same container or toolbar for instance. appreciated if answered ,thanx in advanz
    for now this thing works in same container only. If you need to drag and drop object from one container to another then you should move this object to target container on before dragging.
    This operation may cause unexpected problems, I do not know yet... not tried
    I think the better - wait for official API for Dropping behaviour from Sencha.
    Or you can modify my one.

  7. #17
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    1
    rhonnel francisco is on a distinguished road

      0  

    Default


    Hi, thank you for this great work. But anyway, is there any way to initialize the droppables dynamically? i mean by putting it into a separate function not on the controller.

  8. #18
    Sencha User
    Join Date
    Jun 2013
    Posts
    4
    Vote Rating
    0
    Denis.M is on a distinguished road

      0  

    Default


    Quote Originally Posted by kostysh View Post
    for now this thing works in same container only. If you need to drag and drop object from one container to another then you should move this object to target container on before dragging.<br>
    First of all, thanx to kostysh for the very useful extention! I succeed at dragging object from List container, following your advice - pell of clone of list item. Here is the code samlpe, probably it will be useful for someone:
    PHP Code:
    onTouchStart: function(eventitem){
            var 
    touchedElm  item.element,
                
    xy          touchedElm.getXY(),
                
    left        xy[0] + 1,
                
    top         xy[1] + 1,
                
    size        touchedElm.getSize();
            var 
    draggableCmp Ext.getCmp('draggableItem');
            
    draggableCmp.setTop(top);
            
    draggableCmp.setLeft(left);
            
    draggableCmp.setWidth(size.width);
            
    draggableCmp.setHeight(size.height);
            
    draggableCmp.setHtml('<div class="x-list"><div class="x-list-item x-list-item-tpl">' touchedElm.dom.innerHTML '</div></div>');
            
    Ext.Viewport.add(draggableCmp);
            
    draggableCmp.show();
        } 
    But than I stucked with a problem. I couldn't pass touched event to the clone. I need to make second touch to &nbsp;drag and drop. Can someone tell me your ideas how to do it?

  9. #19
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    Hi, point your attention to the fact, what latest version of ST already has own (official) Draggable and Droppable. My plugin is out of date now

  10. #20
    Sencha User
    Join Date
    Jun 2013
    Posts
    4
    Vote Rating
    0
    Denis.M is on a distinguished road

      0  

    Default


    Possibly I'll switch to the standard classes in future. But question stays open, how to translate touch and move actions to the new container?