Sencha Touch `directionLock` - 我哪里出错了?
我已经定义了一个轮播。
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
direction: 'horizontal',
directionLock: true,
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
bible-_chapterADayView
和 bible-_bibleInAYearView
都是扩展 Ext.Panel 的部分视图。
它们按预期工作,但是我在 这个错误报告仍然存在,即使我已经实现了方向锁定。
我的 DirectionLock 实现哪里出了问题?
我也尝试过以下两种方法。
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
config: {
scrollable: {
direction: 'horizontal',
directionLock: true
},
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
和
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
scrollable: {
direction: 'horizontal',
directionLock: true
},
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
I've got a carousel defined.
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
direction: 'horizontal',
directionLock: true,
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
both the bible-_chapterADayView
and the bible-_bibleInAYearView
are partial views that extend the Ext.Panel.
They're working as expected, however the scrolling issue that I had in this bug report still exists even though I have implemented directionLock.
Where am I going wrong with my directionLock implementation?
I've also tried the following two methods.
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
config: {
scrollable: {
direction: 'horizontal',
directionLock: true
},
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
and
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
scrollable: {
direction: 'horizontal',
directionLock: true
},
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大量测试后,如果
scrollable
附加到partialView而不是carousel,它似乎可以正常工作。After much testing, it appears as though it works properly if the
scrollable
is attached to the partialView rather than the carousel.