禁用在旋转木马中拖动 [英] Disable dragging in Carousel
本文介绍了禁用在旋转木马中拖动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以禁用拖动以在旋转木马面板之间进行交换? 我只想使用指示器。
推荐答案
尝试在旋转木马中重写After Render方法;(我删除了Childs方法上的拖动事件)
afterRender : function() {
Ext.Carousel.superclass.afterRender.call(this);
this.mon(this.body, {
direction : this.direction,
scope : this
});
this.el.addCls(this.baseCls + "-" + this.direction)
}
完整代码;
this.car = new Ext.Carousel({
ui : 'light',
items: [
{
html: '<p>Carousels can be vertical and given a ui of "light" or "dark".</p>',
cls : 'card card1'
},
{
html: 'Card #2',
cls : 'card card2'
},
{
html: 'Card #3',
cls : 'card card3'
}],
afterRender : function() {
Ext.Carousel.superclass.afterRender.call(this);
this.mon(this.body, {
direction : this.direction,
scope : this
});
this.el.addCls(this.baseCls + "-" + this.direction)
}
});
这篇关于禁用在旋转木马中拖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文