please publish your example here.
Printable View
please publish your example here.
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
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.
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
Awesome thanks a bunch!!!!!
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.
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.:-?
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:
But than I stucked with a problem. I couldn't pass touched event to the clone. I need to make second touch to drag and drop. Can someone tell me your ideas how to do it?PHP Code:
onTouchStart: function(event, item){
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();
}
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 :)
/:) 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?