gorekee
27 Oct 2010, 4:22 AM
Hi,
I have the following problem.
I will add new elements in a carousel, but I remove the old and add new ones.
Unfortunately, this does not work, it will not appear.
When I add new without the old remove these precede.
mainPanel = new Ext.Carousel({
fullscreen: true,
indicator: false,
id: 'main',
defaults: {
flex: 1
},
listeners: {
afterrender: function () {
if (helper.detectLandscape())
this.add(sitemap, about_us, sitemapOverview.landscape);
else
this.add(sitemap, about_us, sitemapOverview.landscape);
this.doLayout();
},
orientationchange: function () {
var currentPage = this.getActiveIndex();
this.removeAll();
if (helper.detectLandscape())
this.add(sitemap, about_us, sitemapOverview.landscape);
else
this.add(sitemap, about_us, sitemapOverview.landscape);
this.doLayout();
}
},
animation: 'slide',
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
id: 'bottom_toolbar',
items: [{
xtype: 'spacer'
},
{
html: 'About us',
ui: 'round',
cls: 'Btn_articles',
handler: function () {
mainPanel.setCard(1);
}
}
}]
}]
}),
Thanks for your help.
I have the following problem.
I will add new elements in a carousel, but I remove the old and add new ones.
Unfortunately, this does not work, it will not appear.
When I add new without the old remove these precede.
mainPanel = new Ext.Carousel({
fullscreen: true,
indicator: false,
id: 'main',
defaults: {
flex: 1
},
listeners: {
afterrender: function () {
if (helper.detectLandscape())
this.add(sitemap, about_us, sitemapOverview.landscape);
else
this.add(sitemap, about_us, sitemapOverview.landscape);
this.doLayout();
},
orientationchange: function () {
var currentPage = this.getActiveIndex();
this.removeAll();
if (helper.detectLandscape())
this.add(sitemap, about_us, sitemapOverview.landscape);
else
this.add(sitemap, about_us, sitemapOverview.landscape);
this.doLayout();
}
},
animation: 'slide',
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
id: 'bottom_toolbar',
items: [{
xtype: 'spacer'
},
{
html: 'About us',
ui: 'round',
cls: 'Btn_articles',
handler: function () {
mainPanel.setCard(1);
}
}
}]
}]
}),
Thanks for your help.