Here for prosperity there is a violin of parallel attenuation and extinction.
It uses a container with an absolute layout.
http://jsfiddle.net/R6cgc/13/
var into = Ext.create('Ext.Container', { width: 440, itemId: 'animTo', layout: { type: 'absolute' }, style: { backgroundColor: '#000', padding: '20px' }, renderTo: Ext.getBody() }); var one = Ext.create('Ext.Component', { width: 360, height: 100, x: 0, y: 0, itemId: 'one', style: { backgroundColor: 'green' } }); var two = Ext.create('Ext.Component', { width: 360, height: 500, x: 0, y: 0, itemId: 'two', style: { backgroundColor: 'red', opacity: 0 } }); into.add(one); into.add(two); into.getEl().setHeight(two.getEl().getHeight() + 40); two.hide(); var current = one; Ext.create('Ext.button.Button', { text: 'Fade', renderTo: Ext.getBody(), listeners: { click: function() { current.getEl().fadeOut({ duration: 2000}); current = current == one ? two : one; current.getEl().fadeIn({ duration: 2000}); } } });
source share