PDA

View Full Version : slideIn and slideOut reduces width of component



extjser12
23 Mar 2012, 5:48 AM
Hello together

Can someone help me solve the problem of reducing the width of the component during SlideIn or SlideOut?


Ext.onReady(function () {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'north',
autoHeight: true,
border: false,
margins: '0 0 5 0',
items: [{
xtype: 'container',
id: 'con_notification-box',
cls: 'notification-box',
hidden: true,
border: true,
width: 500,
height: 0,
style: {
position: 'fixed',
minHeight: '75px !important',
left: '50%',
marginLeft: '-250px',
zIndex: '999999',
backgroundColor: 'white'
},
items:[{
xtype: 'container',
html: '<p>Insert your information text here.</p>'
},{
xtype: 'container',
id: 'con_application-close',
cls: 'notification-close',
html: '<br />Close'
}]
},{
xtype: 'container',
html: '<h1 class="x-panel-header">Your title</h1>'
}]
}]
});
var con_notification_box = Ext.getCmp('con_notification-box').getEl();

con_notification_box.slideIn('t', {
easing: 'easeOut',
duration: 500
});

Ext.getCmp('con_application-close').getEl().on('click',function(){
con_notification_box.slideOut('t', { duration: 2000 });
});
});

I'd be very grateful if you could help me.

Kind regards
extjser12