6 Feb 2007 8:46 PM #1
something wrong with animation code
take, for example, blindShow function
First of all, getSize() results are discarded so it doesn't work if newSize isn't specified (that's what led me to the investigation)
Then, if we add alert(this.getSize) to the func bidy we find out that this.getSize is actually a completely irrelevant, it's a func that returns some flavour of screen size and requires a parameter
And then I guess it could use beginMeasure and endMeasure given that the element size of which is required is hiddent when we launch getSize
6 Feb 2007 8:57 PM #2
Err, I did a bit of digging, getSize ma be not as irrelevant as it seemed but I dunno what sdhould be passed to it and it's not "this".
Sorry no time to dig more
6 Feb 2007 9:08 PM #3
It's worked for me before. Maybe a description of what the problem actually is, or some sample calling code would help demonstrate what you're seeing.
7 Feb 2007 1:59 PM #4
var panel = this.panels[headerId];
var actor = new YAHOO.ext.Actor(panel.id, null, true);
On the first run the function successfully hides the panel; on the second however the panel is only resized to one pixel high (or maybe it's some side effect and it's not resized at all).
I injected alerts in YUI ext code and they fire so it's that function that is executed and it's clear from its code that size variable is set and never used; newSize is used and I sure do not pass it explicitly, it was probably your case (you passed newSize in?)
Moreover, if you alert this.getSize that should set for default size value it is not correct which is also understandable if you find the func in the code and inject some debugging alerts or logging into it.
It returns (and logs) correct values when YUI ext Layout uses it but in blindShow is returns the height of one for my case.
24 Feb 2007 12:03 AM #5
Umm... so what's up?
Is there any way to submit biugs or are they picked up riught from here?
Or what is wrong w/ my code
24 Feb 2007 12:18 AM #6
I can tell you that in the .33 codebase, there were some problems related to element size not being persisted correctly across multiple animations in some cases, and so I'm pretty sure that what you are seeing is a bug.
The animation code has been completely refactored in 1.0, and in fact, Actor has been deprecated in favor of the new Ext.fx class. The new effects take chaining and sequencing into account correctly, including caching and auto-resetting element properties like size, opacity, etc., and should allow you to do what you're trying without any problems.
One thing to note: the methods are now slideIn and slideOut, and the API has changed to support 8-way anchoring and an optional animation cofig object. Unfortunately, this stuff is not yet documented, but will be before final release. Hope you can wait -- trying to patch .33 at this point for this particular bug is not likely to happen.
By jon.whitcraft in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 6 Mar 2007, 12:06 PM
By brant in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 19 Feb 2007, 8:27 PM
By saasira in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 7 Dec 2006, 4:54 AM
By donalconlon in forum Community DiscussionReplies: 7Last Post: 26 Nov 2006, 6:04 PM