PDA

View Full Version : Moving the shadow too...



stever
11 Apr 2007, 4:23 PM
I'm replacing another JS window lib with Ext. There is a place where we shake the window, but the Ext window leaves it's shadow behind....

Effect.Shake(myBasicDlg.getEl().id);

Is there another id I can give it?

jack.slocum
11 Apr 2007, 4:41 PM
I generally hide the shadow before doing any movement with it. Otherwise on each animation tween, you will need to call dialog.adjustAssets().

stever
11 Apr 2007, 4:52 PM
Thanks. How do I show/hide the shadow?

Also, in our old lib we used to be able to pass an animation class when showing or hiding a window. I can't quite figure that out in Ext. I did try a myBasicDlg.getEl().switchOff() but that left the shadow as well as the contents of one of the tabs!

jack.slocum
11 Apr 2007, 5:12 PM
For the most part running these types of animations on the dialog directly is too heavy. What about doing it with the proxy?

stever
11 Apr 2007, 5:23 PM
I haven't tried a proxy (yet). But for an example, you can go to the login menu at www.wayki.com and try and log in with a fake username and pass. (There is a bug there that sometimes it tries to do the shake twice, the fix hasn't reached that server yet.)

I tried doing a shake on both the shadow and the dialog, but that didn't work as well as I had hoped. Perhaps if the shadow and the dialog had a common div parent... it wouldn't even need an id or anything... I can get the reference from the dom...

stever
11 Apr 2007, 5:30 PM
As the open and close effects, their sample page is here:

http://prototype-window.xilinus.com/samples.html

Sample one uses effects to show a window and close it. Note that it uses a proxy for the minimize button. And sample seven uses the shake I was talking about.