Thanks for the help. Looking at the Ext.fx.Anim docs and tweaking the example code I was able to implement the right-to-left grow with this animation.
Code:
onShow: function (component) {
var leftPanel = Ext.getCmp('painelesquerdo');
var centralPanel = Ext.getCmp('painelCentral');
var drawBtn = Ext.getCmp('drawBtn');
var oldWidth = component.getWidth();
// Expansion effect starting from zero width
component.setMinWidth(0);
// For some reason, the window appears one time before the animation at X position.
// Therefore, i set width to zero and x outside the viewport with -9999
component.setWidth(0);
component.setX(-9999);
// Aligns the window height with the button height that is docked in the right menu
component.setMinHeight(drawBtn.getHeight());
component.setHeight(drawBtn.getHeight());
component.setY(drawBtn.getY());
// In 150 milliseconds, decreases X value to the left and increases width value to the right
component.animate({
duration: 150,
from: {
width: 0,
x: leftPanel.getWidth() + centralPanel.getWidth()
},
to: {
width: oldWidth,
x: leftPanel.getWidth() + centralPanel.getWidth() - oldWidth
}
});
}
Pretty neat! 