PDA

View Full Version : Problem with window shadow when fading window in



bareflix
18 May 2014, 8:33 AM
I'm trying to get a window to fade in when it is show. I've added the following code to an Ext.window.Window subclass:

beforeShow: function ()
{
this.getEl().setOpacity(0);
},

onShow: function ()
{
var me = this.getEl();
me.animate(
{
target: this,
duration: 5000,
easing: 'ease',
scope: this,
to:
{
opacity: 1
}
});
return me;
},
The problem is that the window shadow is not hidden by the beforeShow function, so the shadow is visible immediately even though the window is not.
Somehow once the animation starts, the shadow's opacity is affected, and then it disappears and fades in with the window.
It works fine if I turn off the shadow, but I like the look of the shadow.
What else do I need to do in my beforeShow function to make the shadow start out invisible?

Gary Schlosberg
6 Jun 2014, 4:35 AM
Here's a thread that should help:
http://www.sencha.com/forum/showthread.php?279843