List Info

Thread: README




README
user name
2006-07-20 13:25:52
Update of
/var/cvs/Geeklog-2.x/Geeklog-2.x/public_html/javascript/yui/
build/animation
In directory
iowaoutdoors:/tmp/cvs-serv897/public_html/javascript/yui/bui
ld/animation

Modified Files:
	README animation-min.js animation.js 
Log Message:
Upgrade to YUI 0.11.1

Index: README
============================================================
=======
RCS file:
/var/cvs/Geeklog-2.x/Geeklog-2.x/public_html/javascript/yui/
build/animation/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README	6 Jul 2006 22:03:28 -0000	1.1
--- README	20 Jul 2006 13:25:49 -0000	1.2
***************
*** 1,4 ****
--- 1,16 ----
  Animation Release Notes
  
+ *** version 0.11.1 ***
+ 
+ * changed "prototype" shorthand to
"proto" (workaround firefox < 1.5 scoping
bug)
+ 
+ *** version 0.11.0 ***
+ 
+ * ColorAnim subclass added
+ * Motion and Scroll now inherit from ColorAnim
+ * getDefaultUnit method added
+ * defaultUnit and defaultUnits deprecated
+ * getDefault and setDefault methods deprecated
+ 
  *** version 0.10.0 ***
  

Index: animation.js
============================================================
=======
RCS file:
/var/cvs/Geeklog-2.x/Geeklog-2.x/public_html/javascript/yui/
build/animation/animation.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** animation.js	6 Jul 2006 22:03:28 -0000	1.1
--- animation.js	20 Jul 2006 13:25:49 -0000	1.2
***************
*** 3,9 ****
  Code licensed under the BSD License:
  http://dev
eloper.yahoo.net/yui/license.txt
! Version: 0.10.0
  */
- 
  /**
   *
--- 3,8 ----
  Code licensed under the BSD License:
  http://dev
eloper.yahoo.net/yui/license.txt
[...1647 lines suppressed...]
!       return val;
!    };
!    
!    /**
!     * Applies a value to an attribute
!     * param  attr The name of the attribute.
!     * param  val The value to be applied to the
attribute.
!     * param  unit The unit ('px', '%', etc.) of
the value.
!     */
!    proto.setAttribute = function(attr, val, unit) {
!       var el = this.getEl();
!       
!       if (attr == 'scroll') {
!          el.scrollLeft = val[0];
!          el.scrollTop = val[1];
!       } else {
!          superclass.setAttribute.call(this, attr, val,
unit);
!       }
!    };
! })();

Index: animation-min.js
============================================================
=======
RCS file:
/var/cvs/Geeklog-2.x/Geeklog-2.x/public_html/javascript/yui/
build/animation/animation-min.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** animation-min.js	6 Jul 2006 22:03:28 -0000	1.1
--- animation-min.js	20 Jul 2006 13:25:49 -0000	1.2
***************
*** 1,7 ****
! /*
! Copyright (c) 2006, Yahoo! Inc. All rights reserved.
! Code licensed under the BSD License:
! http://dev
eloper.yahoo.net/yui/license.txt
! version: 0.10.0
! */
!
YAHOO.util.Anim=function(el,attributes,duration,method){if(e
l){this.init(el,attributes,duration,method);}};YAHOO.util.An
im.prototype={doMethod:function(attribute,start,end){return
this.method(this.currentFrame,start,end-start,this.totalFram
es);},setAttribute:function(attribute,val,unit){YAHOO.util.D
om.setStyle(this.getEl(),attribute,val+unit);},getAttribute:
function(attribute){return
parseFloat(YAHOO.util.Dom.getStyle(this.getEl(),attribute));
},defaultUnit:'px',defaultUnits:{opacity:'
'},init:function(el,attributes,duration,method){var
isAnimated=false;var startTime=null;var endTime=null;var
actualFrames=0;var
defaultValues={};el=YAHOO.util.Dom.get(el);this.attributes=a
ttributes||{};this.duration=duration||1;this.method=method||
YAHOO.util.Easing.easeNone;this.useSeconds=true;this.current
Frame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=f
unction(){return
el;};this.setDefault=function(attribute,val){if(val.construc
tor!=Array&&(val=='auto'||isNaN(val))){switch(attr
ibu
 te){case'width':val=el.clientWidth||el.offsetWidth;break;
case'height':val=el.clientHeight||el.offsetHeight;break;ca
se'left':if(YAHOO.util.Dom.getStyle(el,'position')=='ab
solute'){val=el.offsetLeft;}else{val=0;}break;case'top':i
f(YAHOO.util.Dom.getStyle(el,'position')=='absolute'){va
l=el.offsetTop;}else{val=0;}break;default:val=0;}}defaultVal
ues[attribute]=val;};this.getDefault=function(attribute){ret
urn
defaultValues[attribute];};this.isAnimated=function(){return
isAnimated;};this.getStartTime=function(){return
startTime;};this.animate=function(){if(this.isAnimated()){re
turn
false;}this.onStart.fire();this._onStart.fire();this.totalFr
ames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this
.duration):this.duration;YAHOO.util.AnimMgr.registerElement(
this);var attributes=this.attributes;var el=this.getEl();var
val;for(var attribute in
attributes){val=this.getAttribute(attribute);this.setDefault
(attribute,val);}isAnimated=true;actualFrames=0;startTime=ne
w Date();};this.stop=
 function(){if(!this.isAnimated()){return
false;}this.currentFrame=0;endTime=new Date();var
data={time:endTime,duration:endTime-startTime,frames:actualF
rames,fps:actualFrames/this.duration};isAnimated=false;actua
lFrames=0;this.onComplete.fire(data);};var
onTween=function(){var start;var end=null;var val;var
unit;var attributes=this['attributes'];for(var attribute
in
attributes){unit=attributes[attribute]['unit']||this.defau
ltUnits[attribute]||this.defaultUnit;if(typeof
attributes[attribute]['from']!='undefined'){start=attrib
utes[attribute]['from'];}else{start=this.getDefault(attrib
ute);}if(typeof
attributes[attribute]['to']!='undefined'){end=attributes
[attribute]['to'];}else if(typeof
attributes[attribute]['by']!='undefined'){if(start.const
ructor==Array){end=[];for(var
i=0,len=start.length;i<len;++i){end[i]=start[i]+attribute
s[attribute]['by'][i];}}else{end=start+attributes[attribut
e]['by'];}}if(end!==null&&typeof
end!='undefined'){val=this.doMethod(attribute,start,end);i
f((a
 ttribute=='width'||attribute=='height'||attribute=='op
acity')&&val<0){val=0;}this.setAttribute(attribu
te,val,unit);}}actualFrames+=1;};this._onStart=new
YAHOO.util.CustomEvent('_onStart',this);this.onStart=new
YAHOO.util.CustomEvent('start',this);this.onTween=new
YAHOO.util.CustomEvent('tween',this);this._onTween=new
YAHOO.util.CustomEvent('_tween',this);this.onComplete=new
YAHOO.util.CustomEvent('complete',this);this._onTween.subs
cribe(onTween);}};YAHOO.util.AnimMgr=new function(){var
thread=null;var queue=[];var
tweenCount=0;this.fps=200;this.delay=1;this.registerElement=
function(tween){if(tween.isAnimated()){return
false;}queue[queue.length]=tween;tweenCount+=1;this.start();
};this.start=function(){if(thread===null){thread=setInterval
(this.run,this.delay);}};this.stop=function(tween){if(!tween
){clearInterval(thread);for(var
i=0,len=queue.length;i<len;++i){if(queue[i].isAnimated())
{queue[i].stop();}}queue=[];thread=null;tweenCount=0;}else{t
ween.stop();tweenCount-=1;if(tween
 Count<=0){this.stop();}}};this.run=function(){for(var
i=0,len=queue.length;i<len;++i){var
tween=queue[i];if(!tween||!tween.isAnimated()){continue;}if(
tween.currentFrame<tween.totalFrames||tween.totalFrames==
=null){tween.currentFrame+=1;if(tween.useSeconds){correctFra
me(tween);}tween.onTween.fire();tween._onTween.fire();}else{
YAHOO.util.AnimMgr.stop(tween);}}};var
correctFrame=function(tween){var
frames=tween.totalFrames;var frame=tween.currentFrame;var
expected=(tween.currentFrame*tween.duration*1000/tween.total
Frames);var elapsed=(new Date()-tween.getStartTime());var
tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round(
(elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-
(frame+1);}if(tweak>0&&isFinite(tweak)){if(tween.
currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween
.currentFrame+=tweak;}};};YAHOO.util.Bezier=new
function(){this.getPosition=function(points,t){var
n=points.length;var tmp=[];for(var
i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}for(var 
 j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i
][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*
tmp[parseInt(i+1,10)][1];}}return[tmp[0][0],tmp[0][1]];};};Y
AHOO.util.Easing=new
function(){this.easeNone=function(t,b,c,d){return
b+c*(t/=d);};this.easeIn=function(t,b,c,d){return
b+c*((t/=d)*t*t);};this.easeOut=function(t,b,c,d){var
ts=(t/=d)*t;var tc=ts*t;return
b+c*(tc+-3*ts+3*t);};this.easeBoth=function(t,b,c,d){var
ts=(t/=d)*t;var tc=ts*t;return
b+c*(-2*tc+3*ts);};this.backIn=function(t,b,c,d){var
ts=(t/=d)*t;var tc=ts*t;return
b+c*(-3.4005*tc*ts+10.2*ts*ts+-6.2*tc+0.4*ts);};this.backOut
=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return
b+c*(8.292*tc*ts+-21.88*ts*ts+22.08*tc+-12.69*ts+5.1975*t);}
;this.backBoth=function(t,b,c,d){var ts=(t/=d)*t;var
tc=ts*t;return
b+c*(0.402*tc*ts+-2.1525*ts*ts+-3.2*tc+8*ts+-2.05*t);};};YAH
OO.util.Motion=function(el,attributes,duration,method){if(el
){this.initMotion(el,attributes,duration,method);}};YAHOO.ut
il.Motion.protot
 ype=new
YAHOO.util.Anim();YAHOO.util.Motion.prototype.defaultUnits.p
oints='px';YAHOO.util.Motion.prototype.doMethod=function(a
ttribute,start,end){var
val=null;if(attribute=='points'){var
translatedPoints=this.getTranslatedPoints();var
t=this.method(this.currentFrame,0,100,this.totalFrames)/100;
if(translatedPoints){val=YAHOO.util.Bezier.getPosition(trans
latedPoints,t);}}else{val=this.method(this.currentFrame,star
t,end-start,this.totalFrames);}return
val;};YAHOO.util.Motion.prototype.getAttribute=function(attr
ibute){var
val=null;if(attribute=='points'){val=[this.getAttribute('
left'),this.getAttribute('top')];if(isNaN(val[0])){val[0]
=0;}if(isNaN(val[1])){val[1]=0;}}else{val=parseFloat(YAHOO.u
til.Dom.getStyle(this.getEl(),attribute));}return
val;};YAHOO.util.Motion.prototype.setAttribute=function(attr
ibute,val,unit){if(attribute=='points'){YAHOO.util.Dom.set
Style(this.getEl(),'left',val[0]+unit);YAHOO.util.Dom.setS
tyle(this.getEl(),'top',val[1]+unit);}else{YAHOO.util.Dom.
setStyl
 e(this.getEl(),attribute,val+unit);}};YAHOO.util.Motion.pro
totype.initMotion=function(el,attributes,duration,method){YA
HOO.util.Anim.call(this,el,attributes,duration,method);attri
butes=attributes||{};attributes.points=attributes.points||{}
;attributes.points.control=attributes.points.control||[];thi
s.attributes=attributes;var start;var end=null;var
translatedPoints=null;this.getTranslatedPoints=function(){re
turn translatedPoints;};var
translateValues=function(val,self){var
pageXY=YAHOO.util.Dom.getXY(self.getEl());val=[val[0]-pageXY
[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var
onStart=function(){start=this.getAttribute('points');var
attributes=this.attributes;var
control=attributes['points']['control']||[];if(control.l
ength>0&&control[0].constructor!=Array){control=[
control];}if(YAHOO.util.Dom.getStyle(this.getEl(),'position
')=='static'){YAHOO.util.Dom.setStyle(this.getEl(),'posi
tion','relative');}if(typeof
attributes['points']['from']!='undefined'){YAHOO.util.
Dom.
 setXY(this.getEl(),attributes['points']['from']);start=
this.getAttribute('points');}else
if((start[0]===0||start[1]===0)){YAHOO.util.Dom.setXY(this.g
etEl(),YAHOO.util.Dom.getXY(this.getEl()));start=this.getAtt
ribute('points');}var i,len;if(typeof
attributes['points']['to']!='undefined'){end=translate
Values(attributes['points']['to'],this);for(i=0,len=cont
rol.length;i<len;++i){control[i]=translateValues(control[
i],this);}}else if(typeof
attributes['points']['by']!='undefined'){end=[start[0]
+attributes['points']['by'][0],start[1]+attributes['poi
nts']['by'][1]];for(i=0,len=control.length;i<len;++i){
control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}
}if(end){translatedPoints=[start];if(control.length>0){tr
anslatedPoints=translatedPoints.concat(control);}translatedP
oints[translatedPoints.length]=end;}};this._onStart.subscrib
e(onStart);};YAHOO.util.Scroll=function(el,attributes,durati
on,method){if(el){YAHOO.util.Anim.call(this,el,attributes,du
ration,method);}};YAHOO.util.
 Scroll.prototype=new
YAHOO.util.Anim();YAHOO.util.Scroll.prototype.defaultUnits.s
croll='
';YAHOO.util.Scroll.prototype.doMethod=function(attribute,s
tart,end){var
val=null;if(attribute=='scroll'){val=[this.method(this.cur
rentFrame,start[0],end[0]-start[0],this.totalFrames),this.me
thod(this.currentFrame,start[1],end[1]-start[1],this.totalFr
ames)];}else{val=this.method(this.currentFrame,start,end-sta
rt,this.totalFrames);}return
val;};YAHOO.util.Scroll.prototype.getAttribute=function(attr
ibute){var val=null;var
el=this.getEl();if(attribute=='scroll'){val=[el.scrollLeft
,el.scrollTop];}else{val=parseFloat(YAHOO.util.Dom.getStyle(
el,attribute));}return
val;};YAHOO.util.Scroll.prototype.setAttribute=function(attr
ibute,val,unit){var
el=this.getEl();if(attribute=='scroll'){el.scrollLeft=val[
0];el.scrollTop=val[1];}else{YAHOO.util.Dom.setStyle(el,attr
ibute,val+unit);}};
--- 1 ----
! /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. 
Code licensed under the BSD License: http://dev
eloper.yahoo.net/yui/license.txt Version: 0.11.1 */
YAHOO.util.Anim=function(el,attributes,duration,method){if(e
l){this.init(el,attributes,duration,method);}};YAHOO.util.An
im.prototype={toString:function(){var el=this.getEl();var
id=el.id||el.tagName;return("Anim
"+id);},patterns:{noNegatives:/width|height|opacity|pa
dding/i,offsetAttribute:/^((width|height)|(top|left))$/,defa
ultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit
:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr
,start,end){return
this.method(this.currentFrame,start,end-start,this.totalFram
es);},setAttribute:function(attr,val,unit){if(this.patterns.
noNegatives.test(attr)){val=(val>0)?val:0;}YAHOO.util.Dom
.setStyle(this.getEl(),attr,val+unit);},getAttribute:functio
n(attr){var el=this.getEl();var
val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&
amp;!this.patterns.offsetUnit.test(val)){return p
 arseFloat(val);}var
a=this.patterns.offsetAttribute.exec(attr)||[];var
pos=!!(a[3]);var
box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position
')=='absolute'&&pos)){val=el['offset'+a[0].charA
t(0).toUpperCase()+a[0].substr(1)];}else{val=0;}return
val;},getDefaultUnit:function(attr){if(this.patterns.default
Unit.test(attr)){return'px';}return'';},setRuntimeAttrib
ute:function(attr){var start;var end;var
attributes=this.attributes;this.runtimeAttributes[attr]={};v
ar isset=function(prop){return(typeof
prop!=='undefined');};if(!isset(attributes[attr]['to'])&
amp;&!isset(attributes[attr]['by'])){return
false;}start=(isset(attributes[attr]['from']))?attributes[
attr]['from']:this.getAttribute(attr);if(isset(attributes[
attr]['to'])){end=attributes[attr]['to'];}else
if(isset(attributes[attr]['by'])){if(start.constructor==Ar
ray){end=[];for(var
i=0,len=start.length;i<len;++i){end[i]=start[i]+attribute
s[attr]['by'][i];}}else{end=start+attributes[attr]['by']
;}}this.runtimeAttributes[attr].sta
 rt=start;this.runtimeAttributes[attr].end=end;this.runtimeA
ttributes[attr].unit=(isset(attributes[attr].unit))?attribut
es[attr]['unit']:this.getDefaultUnit(attr);},init:function
(el,attributes,duration,method){var isAnimated=false;var
startTime=null;var
actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=att
ributes||{};this.duration=duration||1;this.method=method||YA
HOO.util.Easing.easeNone;this.useSeconds=true;this.currentFr
ame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.getEl=fun
ction(){return el;};this.isAnimated=function(){return
isAnimated;};this.getStartTime=function(){return
startTime;};this.runtimeAttributes={};this.animate=function(
){if(this.isAnimated()){return
false;}this.currentFrame=0;this.totalFrames=(this.useSeconds
)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.durat
ion;YAHOO.util.AnimMgr.registerElement(this);};this.stop=fun
ction(){YAHOO.util.AnimMgr.stop(this);};var
onStart=function(){this.onStart.fire();for(var attr in
this.attributes){this.s
 etRuntimeAttribute(attr);}isAnimated=true;actualFrames=0;st
artTime=new Date();};var onTween=function(){var
data={duration:new
Date()-this.getStartTime(),currentFrame:this.currentFrame};d
ata.toString=function(){return('duration:
'+data.duration+', currentFrame:
'+data.currentFrame);};this.onTween.fire(data);var
runtimeAttributes=this.runtimeAttributes;for(var attr in
runtimeAttributes){this.setAttribute(attr,this.doMethod(attr
,runtimeAttributes[attr].start,runtimeAttributes[attr].end),
runtimeAttributes[attr].unit);}actualFrames+=1;};var
onComplete=function(){var actual_duration=(new
Date()-startTime)/1000;var
data={duration:actual_duration,frames:actualFrames,fps:actua
lFrames/actual_duration};data.toString=function(){return('d
uration: '+data.duration+', frames: '+data.frames+',
fps:
'+data.fps);};isAnimated=false;actualFrames=0;this.onComple
te.fire(data);};this._onStart=new
YAHOO.util.CustomEvent('_start',this,true);this.onStart=ne
w YAHOO.util.CustomEvent('start',this);this.o
 nTween=new
YAHOO.util.CustomEvent('tween',this);this._onTween=new
YAHOO.util.CustomEvent('_tween',this,true);this.onComplete
=new
YAHOO.util.CustomEvent('complete',this);this._onComplete=n
ew
YAHOO.util.CustomEvent('_complete',this,true);this._onStar
t.subscribe(onStart);this._onTween.subscribe(onTween);this._
onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new
function(){var thread=null;var queue=[];var
tweenCount=0;this.fps=200;this.delay=1;this.registerElement=
function(tween){queue[queue.length]=tween;tweenCount+=1;twee
n._onStart.fire();this.start();};this.unRegister=function(tw
een,index){tween._onComplete.fire();index=index||getIndex(tw
een);if(index!=-1){queue.splice(index,1);}tweenCount-=1;if(t
weenCount<=0){this.stop();}};this.start=function(){if(thr
ead===null){thread=setInterval(this.run,this.delay);}};this.
stop=function(tween){if(!tween){clearInterval(thread);for(va
r
i=0,len=queue.length;i<len;++i){if(queue[i].isAnimated())
{this.unRegister(tween,i);}}queue=[];threa
 d=null;tweenCount=0;}else{this.unRegister(tween);}};this.ru
n=function(){for(var i=0,len=queue.length;i<len;++i){var
tween=queue[i];if(!tween||!tween.isAnimated()){continue;}if(
tween.currentFrame<tween.totalFrames||tween.totalFrames==
=null){tween.currentFrame+=1;if(tween.useSeconds){correctFra
me(tween);}tween._onTween.fire();}else{YAHOO.util.AnimMgr.st
op(tween,i);}}};var getIndex=function(anim){for(var
i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return
i;}}return-1;};var correctFrame=function(tween){var
frames=tween.totalFrames;var frame=tween.currentFrame;var
expected=(tween.currentFrame*tween.duration*1000/tween.total
Frames);var elapsed=(new Date()-tween.getStartTime());var
tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round(
(elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-
(frame+1);}if(tweak>0&&isFinite(tweak)){if(tween.
currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween
.currentFrame+=tweak;}};};YAHOO.util.Bezier=new
function(){this.getPosition
 =function(points,t){var n=points.length;var tmp=[];for(var
i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}for(var
j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i]
[0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*t
mp[parseInt(i+1,10)][1];}}return[tmp[0][0],tmp[0][1]];};};(f
unction(){YAHOO.util.ColorAnim=function(el,attributes,durati
on,method){YAHOO.util.ColorAnim.superclass.constructor.call(
this,el,attributes,duration,method);};YAHOO.extend(YAHOO.uti
l.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var
superclass=Y.ColorAnim.superclass;var
proto=Y.ColorAnim.prototype;proto.toString=function(){var
el=this.getEl();var
id=el.id||el.tagName;return("ColorAnim
"+id);};proto.patterns.color=/color$/i;proto.patterns.
rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i
;proto.patterns.hex=/^#?([0-9A-F])([0-9A-F])([0-9A-F])$/i;proto.patterns.hex3=/^#?([0-9A-F])([0-9A-F])([0
-9A-F])$/i;proto.parseColor=function(s){if(s.length==3){r
eturn s;}var c=this.patter
 ns.hex.exec(s);if(c&&c.length==4){return[parseInt(c
[1],16),parseInt(c[2],16),parseInt(c[3],16)];}c=this.pattern
s.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1
],10),parseInt(c[2],10),parseInt(c[3],10)];}c=this.patterns.
hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]
+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}re
turn null;};proto.getAttribute=function(attr){var
el=this.getEl();if(this.patterns.color.test(attr)){var
val=YAHOO.util.Dom.getStyle(el,attr);if(val=='transparent'
){var
parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(p
arent&&val=='transparent'){parent=parent.parentNod
e;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperC
ase()=='HTML'){val='ffffff';}}}}else{val=superclass.getA
ttribute.call(this,attr);}return
val;};proto.doMethod=function(attr,start,end){var
val;if(this.patterns.color.test(attr)){val=[];for(var
i=0,len=start.length;i<len;++i){val[i]=superclass.doMetho
d.call(this,attr,start[i],end[i]);}val='rgb('+Math.floor(v
al[0])+
 ','+Math.floor(val[1])+','+Math.floor(val[2])+')';}el
se{val=superclass.doMethod.call(this,attr,start,end);}return
val;};proto.setRuntimeAttribute=function(attr){superclass.se
tRuntimeAttribute.call(this,attr);if(this.patterns.color.tes
t(attr)){var attributes=this.attributes;var
start=this.parseColor(this.runtimeAttributes[attr].start);va
r
end=this.parseColor(this.runtimeAttributes[attr].end);if(typ
eof attributes[attr]['to']==='undefined'&&typeof
attributes[attr]['by']!=='undefined'){end=this.parseColo
r(attributes[attr].by);for(var
i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}
this.runtimeAttributes[attr].start=start;this.runtimeAttribu
tes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:functi
on(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return
c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-
2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1)return
c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:functi
on(t,b,c,d){return c*(t/=d)*t*t*t+b;},ea
 seOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+
b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1)return
c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:func
tion(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return
b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var
s=p/4;}else var
s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1
))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(
t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return
b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var
s=p/4;}else var s=p/(2*Math.PI)*Math.asin(c/a);return
a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},el
asticBoth:function(t,b,c,d,a,p){if(t==0)return
b;if((t/=d/2)==2)return
b+c;if(!p)p=d*(.3*1.5);if(!a||a<Math.abs(c)){a=c;var
s=p/4;}else var
s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.p
ow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return
a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+
c+b;},backIn:function(t,b,c,d,s){if(typeof s=='u
 ndefined')s=1.70158;return
c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(ty
peof s=='undefined')s=1.70158;return
c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,
s){if(typeof
s=='undefined')s=1.70158;if((t/=d/2)<1)return
c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return
c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:functio
n(t,b,c,d){return
c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:funct
ion(t,b,c,d){if((t/=d)<(1/2.75)){return
c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return
c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else
if(t<(2.5/2.75)){return
c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return
c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},bounceBoth:funct
ion(t,b,c,d){if(t<d/2)return
YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;return
YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(funct
ion(){YAHOO.util.Motion=function(el,attributes,duration,meth
od){if(el){YAHOO.util.Motion.superclass.constructor.call(thi
s,el,attributes,duration,method);}};YAHOO.exte
 nd(YAHOO.util.Motion,YAHOO.util.ColorAnim);var
Y=YAHOO.util;var superclass=Y.Motion.superclass;var
proto=Y.Motion.prototype;proto.toString=function(){var
el=this.getEl();var
id=el.id||el.tagName;return("Motion
"+id);};proto.patterns.points=/^points$/i;proto.setAtt
ribute=function(attr,val,unit){if(this.patterns.points.test(
attr)){unit=unit||'px';superclass.setAttribute.call(this,
'left',val[0],unit);superclass.setAttribute.call(this,'top
',val[1],unit);}else{superclass.setAttribute.call(this,attr
,val,unit);}};proto.getAttribute=function(attr){if(this.patt
erns.points.test(attr)){var
val=[superclass.getAttribute.call(this,'left'),superclass.
getAttribute.call(this,'top')];}else{val=superclass.getAtt
ribute.call(this,attr);}return
val;};proto.doMethod=function(attr,start,end){var
val=null;if(this.patterns.points.test(attr)){var
t=this.method(this.currentFrame,0,100,this.totalFrames)/100;
val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}el
se{val=superclass.doMethod.call(this,
 attr,start,end);}return
val;};proto.setRuntimeAttribute=function(attr){if(this.patte
rns.points.test(attr)){var el=this.getEl();var
attributes=this.attributes;var start;var
control=attributes['points']['control']||[];var end;var
i,len;if(control.length>0&&!(control[0]instanceof
Array)){control=[control];}else{var
tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=contr
ol[i];}control=tmp;}if(Y.Dom.getStyle(el,'position')=='st
atic'){Y.Dom.setStyle(el,'position','relative');}if(iss
et(attributes['points']['from'])){Y.Dom.setXY(el,attribu
tes['points']['from']);}else{Y.Dom.setXY(el,Y.Dom.getXY(
el));}start=this.getAttribute('points');if(isset(attribute
s['points']['to'])){end=translateValues.call(this,attrib
utes['points']['to'],start);var
pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;
i<len;++i){control[i]=translateValues.call(this,control[i
],start);}}else
if(isset(attributes['points']['by'])){end=[start[0]+attr
ibutes['points']['by'][0],start[1]+attributes['points'
]['by
 '][1]];for(i=0,len=control.length;i<len;++i){control[i]
=[start[0]+control[i][0],start[1]+control[i][1]];}}this.runt
imeAttributes[attr]=[start];if(control.length>0){this.run
timeAttributes[attr]=this.runtimeAttributes[attr].concat(con
trol);}this.runtimeAttributes[attr][this.runtimeAttributes[a
ttr].length]=end;}else{superclass.setRuntimeAttribute.call(t
his,attr);}};var translateValues=function(val,start){var
pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start
[0],val[1]-pageXY[1]+start[1]];return val;};var
isset=function(prop){return(typeof
prop!=='undefined');};})();(function(){YAHOO.util.Scroll=f
unction(el,attributes,duration,method){if(el){YAHOO.util.Scr
oll.superclass.constructor.call(this,el,attributes,duration,
method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAn
im);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var
proto=Y.Scroll.prototype;proto.toString=function(){var
el=this.getEl();var
id=el.id||el.tagName;return("Scroll
"+id);};proto.doMethod=funct
 ion(attr,start,end){var
val=null;if(attr=='scroll'){val=[this.method(this.currentF
rame,start[0],end[0]-start[0],this.totalFrames),this.method(
this.currentFrame,start[1],end[1]-start[1],this.totalFrames)
];}else{val=superclass.doMethod.call(this,attr,start,end);}r
eturn val;};proto.getAttribute=function(attr){var
val=null;var
el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.s
crollTop];}else{val=superclass.getAttribute.call(this,attr);
}return val;};proto.setAttribute=function(attr,val,unit){var
el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el
.scrollTop=val[1];}else{superclass.setAttribute.call(this,at
tr,val,unit);}};})();

_______________________________________________
geeklog2-cvs mailing list
geeklog2-cvslists.geeklog.net
http://lists.geeklog.net/mailman/listinfo/geeklog2-cvs

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )