Sencha touch stopEvent()不处理拖动事件
我有一个容器,我在它的配置中用它来拖拽:Sencha touch stopEvent()不处理拖动事件,sencha-touch,extjs,sencha-touch-2,Sencha Touch,Extjs,Sencha Touch 2,我有一个容器,我在它的配置中用它来拖拽: draggable: { direction: 'horizontal', constraint: { min: { x: 0, y: 0 }, max: { x: parseInt(screen.width-57), y: 0 } }, listeners: { dragstart: function(panel, e, offset){ }, drag: function(panel,
draggable: {
direction: 'horizontal',
constraint: {
min: { x: 0, y: 0 },
max: { x: parseInt(screen.width-57), y: 0 }
},
listeners: {
dragstart: function(panel, e, offset){
},
drag: function(panel, e, offset){
},
dragend: function(panel, e, offset){
},
scope: this
},
}
很好。现在,我想防止用户在触发拖动事件时拖动面板。这听起来可能很愚蠢,但为了防止用户直接拖动面板,他必须将手指放在工具栏上才能拖动面板
我已经试过一些方法,比如
return false;
e.stopEvent();
e.stopPropagation();
e.preventDefault();
但没有一个成功。有人知道为什么吗?我终于将dragstart事件更改为
dragstart: {
fn: function(){
},
order: 'before'
},
并返回false;工作正常…您是否在dragstart或drag事件中尝试了panel.firevent'dragend'或其同类功能?我认为firevent函数无法在panel对象上工作,是吗?