0
Я использую Sencha Touch 1.1. Следующий код составляет вид:Карты не отображаются в приложении Sencha Touch
truApp.views.IncidentParentView = Ext.extend(Ext.Panel, {
layout: {
type: 'hbox',
align: 'top'
},
initComponent: function() {
this.sectionStore = Ext.StoreMgr.get(TrafficResponse.Stores.IncidentSections);
this.topToolbar = new Ext.Toolbar({
items: [
{
text: 'Cancel',
ui: 'back',
handler: function() {
Ext.dispatch({
controller: truApp.controllers.incidentController,
action: 'cancel'
});
}
},
{
xtype: 'spacer'
},
{
text: 'Submit',
ui: 'confirm',
handler: function() {
Ext.dispatch({
controller: truApp.controllers.incidentController,
action: 'submit'
});
}
}
]
});
this.dockedItems = [ this.topToolbar ];
this.items = [
{
flex: 1,
dockedItems: [
{
xtype: 'toolbar',
title: 'Sections',
ui: 'light'
}
],
items: [
{
xtype: 'list',
store: this.sectionStore,
scroll: false,
itemTpl: '{Description}',
listeners: {
itemTap: function(dataView, index, item, e) {
var record = dataView.store.getAt(index);
truApp.views.incidentParentView.getComponent('incidentCardPanel').setActiveItem(
index,
{ type: 'slide', direction: 'left' }
);
},
afterrender: function(dataView) {
dataView.getSelectionModel().select(0, false, false);
truApp.views.incidentParentView.getComponent('incidentCardPanel').setActiveItem(
0,
{ type: 'slide', direction: 'left' }
);
}
},
onItemDisclosure: true
}
]
},
{
flex: 3,
id: 'incidentCardPanel',
xtype: 'panel',
layout: 'card',
items: [
{
html: 'card 1'
},
{
html: 'card 2'
},
{
html: 'card 3'
},
{
html: 'card 4'
},
{
html: 'card 5'
},
{
html: 'card 6'
}
]
}
];
truApp.views.IncidentParentView.superclass.initComponent.call(this);
}
});
Когда используется макет карты, ничего не отображается. Когда используется «vbox», отображаются все 6 элементов - карта 1 - карта 6.
Почему элементы не отображаются при использовании макета карты?
Это приводит к рендерингу карты, но поскольку это макет вложенной карты, окончательный макет не то, что мне нужно. Проблема рендеринга вызвана тем, что свойство высоты панели карты не задано. – Anthony
Ваш вопрос был о том, что карты не отображаются. Кажется, это исправлено, правильно? Какой именно желаемый эффект вы ожидаете? –
панель карты встроена в панель hbox. Создание полноэкранного режима панели панели останавливает отображение других компонентов hbox. – Anthony