rrraven
6 Feb 2007, 8:46 PM
take, for example, blindShow function
blindShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;}
this.unclip();return size;};
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 ;)
blindShow=function(anchor,newSize,duration,easing){var size=newSize||this.getSize();this.clip();this.setVisible(true);anchor=anchor.toLowerCase();switch(anchor){case't':case'top':this.setHeight(1);this.setHeight(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;case'l':case'left':this.setWidth(1);this.setWidth(newSize,true,duration||.5,null,easing||YAHOO.util.Easing.easeOut);break;}
this.unclip();return size;};
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 ;)