fixed the resizable text area with IE problem fixed the ad space with IE problem merged the 7.2.0 and 7.1.4 change logs
1131 lines
No EOL
27 KiB
HTML
1131 lines
No EOL
27 KiB
HTML
|
|
<html>
|
|
<head>
|
|
<title>
|
|
JavaScript Documentation -
|
|
|
|
YAHOO.util.Anim
|
|
|
|
</title>
|
|
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="header">
|
|
<h1>JavaScript Documentation</h1>
|
|
<h3><a href="./index.html">Animation Utility</a></h3>
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
<a href="javascript: alert('This location is TBD');">Home</a>
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="./index.html">Animation Utility</a>
|
|
>
|
|
<strong>YAHOO.util.Anim</strong>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="body">
|
|
|
|
|
|
<div class="nav">
|
|
<div class="module resources">
|
|
<ul class="content">
|
|
<li><a href="overview-tree.html">Tree View</a></li>
|
|
<li><a href="index-all.html">Element Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="module">
|
|
<h4><a href="./allclasses-noframe.html">Classes</a></h4>
|
|
<ul class="content">
|
|
|
|
<li>
|
|
<a href="YAHOO.util.html">
|
|
YAHOO.util</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Anim.html">
|
|
YAHOO.util.Anim</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.AnimMgr.html">
|
|
YAHOO.util.AnimMgr</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Bezier.html">
|
|
YAHOO.util.Bezier</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.ColorAnim.html">
|
|
YAHOO.util.ColorAnim</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Easing.html">
|
|
YAHOO.util.Easing</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Motion.html">
|
|
YAHOO.util.Motion</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="YAHOO.util.Scroll.html">
|
|
YAHOO.util.Scroll</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="module">
|
|
<h4><a href="./overview-summary.html">Files</a></h4>
|
|
<ul class="content">
|
|
|
|
<li>
|
|
<a href="overview-summary-Anim.js.html">
|
|
Anim.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-AnimMgr.js.html">
|
|
AnimMgr.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-Bezier.js.html">
|
|
Bezier.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-ColorAnim.js.html">
|
|
ColorAnim.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-Easing.js.html">
|
|
Easing.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-Motion.js.html">
|
|
Motion.js</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="overview-summary-Scroll.js.html">
|
|
Scroll.js</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="pri">
|
|
<div class="main">
|
|
|
|
<h2>Class YAHOO.util.Anim</h2>
|
|
<pre>Object
|
|
|
|
|
+--<b>YAHOO.util.Anim</b>
|
|
</pre>
|
|
|
|
|
|
<dl class="subclasses">
|
|
<dt>Direct Known Subclasses:</dd>
|
|
<dd>
|
|
<a href="YAHOO.util.ColorAnim.html">YAHOO.util.ColorAnim</a>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<hr />
|
|
|
|
<!-- Class definition -->
|
|
<div class="class-def">
|
|
<div class="class-name">
|
|
<span class="class-attribs">
|
|
|
|
</span>
|
|
<span class="class-type">class</span>
|
|
<b>YAHOO.util.Anim</b>
|
|
</div>
|
|
<div class="class-extends">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="requires">
|
|
<dt><strong>Requires:</strong></dt>
|
|
|
|
<dd><a href="YAHOO.util.AnimMgr.html#">YAHOO.util.AnimMgr</a></dd>
|
|
|
|
<dd><a href="YAHOO.util.Easing.html#">YAHOO.util.Easing</a></dd>
|
|
|
|
<dd>YAHOO.util.Dom </dd>
|
|
|
|
<dd>YAHOO.util.Event </dd>
|
|
|
|
<dd>YAHOO.util.CustomEvent </dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="summary">
|
|
<p>
|
|
Base animation class that provides the interface for building animated effects.
|
|
<p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- ======== QUICK LINKS ======== -->
|
|
<div class="quick-links">
|
|
<strong>Quick Links:</strong>
|
|
|
|
|
|
<a href="#field_summary">Field Summary</a>
|
|
|
|
|
|
|
|
|
<a href="#constructor_summary">Constructor Summary</a>
|
|
|
|
|
|
|
|
|
<a href="#methodSummary">Method Summary</a> |
|
|
|
|
|
|
<a href="#fieldDetails">Field Details</a>
|
|
|
|
|
|
|
|
|
<a href="#constructorDetails">Constructor Details</a>
|
|
|
|
|
|
|
|
|
<a href="#methodDetails">Method Details</a>
|
|
|
|
</div>
|
|
<!-- ======== END QUICK LINKS ======== -->
|
|
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
<div class="section field summaries">
|
|
<h3><a name="field_summary">Field Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
<tr>
|
|
<td class="flags">Object</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#attributes">attributes</a>
|
|
</code>
|
|
<div class="description">
|
|
The collection of attributes to be animated.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#currentFrame">currentFrame</a>
|
|
</code>
|
|
<div class="description">
|
|
The location of the current animation on the timeline.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Number</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#duration">duration</a>
|
|
</code>
|
|
<div class="description">
|
|
The length of the animation.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Function</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#method">method</a>
|
|
</code>
|
|
<div class="description">
|
|
The method that will provide values to the attribute(s) during the animation.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">CustomEvent</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#onComplete">onComplete</a>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires when animation ends
|
|
Listen via subscribe method (e.g.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">CustomEvent</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#onStart">onStart</a>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires when animation begins
|
|
Listen via subscribe method (e.g.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">CustomEvent</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#onTween">onTween</a>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires between each frame
|
|
Listen via subscribe method (e.g.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Int</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#totalFrames">totalFrames</a>
|
|
</code>
|
|
<div class="description">
|
|
The total number of frames to be executed.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Boolean</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#useSeconds">useSeconds</a>
|
|
</code>
|
|
<div class="description">
|
|
Whether or not the duration should be treated as seconds.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- =========== END FIELD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<div class="section contructor summaries">
|
|
<h3><a name="constructor_summary">Constructor Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<code class="spec">
|
|
<a href="YAHOO.util.Anim.html#YAHOO.util.Anim()">YAHOO.util.Anim</a>
|
|
</code>
|
|
<div class="description">
|
|
Base class for animated DOM objects.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<div class="section method summaries">
|
|
<h3><a name="methodSummary">Method Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
<tr>
|
|
<td class="flags">Object</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#animate">animate</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Starts the animation by registering it with the animation manager.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Number</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#doMethod">doMethod</a>
|
|
(<String> attr, <Number> start, <Number> end)
|
|
</code>
|
|
<div class="description">
|
|
Returns the value computed by the animation's "method".
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Number</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getAttribute">getAttribute</a>
|
|
(<String> attr)
|
|
</code>
|
|
<div class="description">
|
|
Returns current value of the attribute.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">String</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getDefaultUnit">getDefaultUnit</a>
|
|
(<attr> attr)
|
|
</code>
|
|
<div class="description">
|
|
Returns the unit to use when none is supplied.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">HTMLElement</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getEl">getEl</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Returns a reference to the animated element.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Date</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#getStartTime">getStartTime</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Returns the animation start time.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">void</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#init">init</a>
|
|
(el, <Object> attributes, <Number> duration, <Function> method)
|
|
</code>
|
|
<div class="description">
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">Boolean</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#isAnimated">isAnimated</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Checks whether the element is currently animated.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">void</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#setAttribute">setAttribute</a>
|
|
(<String> attr, <Number> val, <String> unit)
|
|
</code>
|
|
<div class="description">
|
|
Applies a value to an attribute
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">void</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#stop">stop</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
Stops the animation.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="flags">String</td>
|
|
<td class="spec">
|
|
<code>
|
|
<a href="#toString">toString</a>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
toString method
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ========== END METHOD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ============ FIELD DETAIL START =========== -->
|
|
|
|
<div class="section field details">
|
|
<h3><a name="fieldDetails">Field Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
|
|
<h4><a name="attributes">attributes</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Object
|
|
|
|
<strong>attributes</strong>
|
|
</code>
|
|
<div class="description">
|
|
The collection of attributes to be animated.
|
|
Each attribute must have at least a "to" or "by" defined in order to animate.
|
|
If "to" is supplied, the animation will end with the attribute at that value.
|
|
If "by" is supplied, the animation will end at that value plus its starting value.
|
|
If both are supplied, "to" is used, and "by" is ignored.
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="currentFrame">currentFrame</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Int
|
|
|
|
<strong>currentFrame</strong>
|
|
</code>
|
|
<div class="description">
|
|
The location of the current animation on the timeline.
|
|
In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="duration">duration</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Number
|
|
|
|
<strong>duration</strong>
|
|
</code>
|
|
<div class="description">
|
|
The length of the animation. Defaults to "1" (second).
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="method">method</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Function
|
|
|
|
<strong>method</strong>
|
|
</code>
|
|
<div class="description">
|
|
The method that will provide values to the attribute(s) during the animation.
|
|
Defaults to "YAHOO.util.Easing.easeNone".
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="onComplete">onComplete</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
CustomEvent
|
|
|
|
<strong>onComplete</strong>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires when animation ends
|
|
Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction)
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="onStart">onStart</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
CustomEvent
|
|
|
|
<strong>onStart</strong>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires when animation begins
|
|
Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction)
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="onTween">onTween</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
CustomEvent
|
|
|
|
<strong>onTween</strong>
|
|
</code>
|
|
<div class="description">
|
|
Custom event that fires between each frame
|
|
Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction)
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="totalFrames">totalFrames</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Int
|
|
|
|
<strong>totalFrames</strong>
|
|
</code>
|
|
<div class="description">
|
|
The total number of frames to be executed.
|
|
In time-based animations, this is used by AnimMgr to ensure the animation finishes on time.
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="useSeconds">useSeconds</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Boolean
|
|
|
|
<strong>useSeconds</strong>
|
|
</code>
|
|
<div class="description">
|
|
Whether or not the duration should be treated as seconds.
|
|
Defaults to true.
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ============ FIELD DETAIL END =========== -->
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
|
|
|
<div class="section constructor details">
|
|
<h3><a name="constructorDetails">Constructor Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
<h4><a name="YAHOO.util.Anim()">YAHOO.util.Anim</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
<strong>YAHOO.util.Anim</strong>
|
|
()
|
|
</code>
|
|
<div class="description">
|
|
|
|
Base class for animated DOM objects.
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>el</code> -
|
|
Reference to the element that will be animated. Can be an ID or HTMLElement.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>attributes</code> -
|
|
The attribute(s) to be animated. Each attribute is an object with at minimum a "to" or "by" member defined. Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). All attribute names use camelCase.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>duration</code> -
|
|
(optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>method</code> -
|
|
(optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
|
|
|
|
|
<!-- ============ METHOD DETAIL START ========== -->
|
|
|
|
<div class="section method details">
|
|
<h3><a name="methodDetails">Method Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
<div class="content">
|
|
|
|
<h4><a name="animate">animate</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Object
|
|
<strong>animate</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Starts the animation by registering it with the animation manager.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="doMethod">doMethod</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Number
|
|
<strong>doMethod</strong>
|
|
(<String> attr, <Number> start, <Number> end)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the value computed by the animation's "method".
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>attr</code> -
|
|
The name of the attribute.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>start</code> -
|
|
The value this attribute should start from for this animation.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>end</code> -
|
|
The value this attribute should end at for this animation.
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> The Value to be applied to the attribute.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getAttribute">getAttribute</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Number
|
|
<strong>getAttribute</strong>
|
|
(<String> attr)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns current value of the attribute.
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>attr</code> -
|
|
The name of the attribute.
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> val The current value of the attribute.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getDefaultUnit">getDefaultUnit</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
String
|
|
<strong>getDefaultUnit</strong>
|
|
(<attr> attr)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the unit to use when none is supplied.
|
|
Applies the "defaultUnit" test to decide whether to use pixels or not
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>attr</code> -
|
|
The name of the attribute.
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> The default unit to be used.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getEl">getEl</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
HTMLElement
|
|
<strong>getEl</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns a reference to the animated element.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="getStartTime">getStartTime</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Date
|
|
<strong>getStartTime</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the animation start time.
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> current value of startTime.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="init">init</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
void
|
|
<strong>init</strong>
|
|
(el, <Object> attributes, <Number> duration, <Function> method)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>el</code> -
|
|
Reference to the element that will be animated. Can be an ID or HTMLElement.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>attributes</code> -
|
|
The attribute(s) to be animated. Each attribute is an object with at minimum a "to" or "by" member defined. Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). All attribute names use camelCase.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>duration</code> -
|
|
(optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>method</code> -
|
|
(optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="isAnimated">isAnimated</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
Boolean
|
|
<strong>isAnimated</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Checks whether the element is currently animated.
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> current value of isAnimated.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="setAttribute">setAttribute</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
void
|
|
<strong>setAttribute</strong>
|
|
(<String> attr, <Number> val, <String> unit)
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Applies a value to an attribute
|
|
|
|
|
|
<dl>
|
|
<dt>Parameters:</dt>
|
|
|
|
<dd>
|
|
<code>attr</code> -
|
|
The name of the attribute.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>val</code> -
|
|
The value to be applied to the attribute.
|
|
</dd>
|
|
|
|
<dd>
|
|
<code>unit</code> -
|
|
The unit ('px', '%', etc.) of the value.
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="stop">stop</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
void
|
|
<strong>stop</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Stops the animation. Normally called by AnimMgr when animation completes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
<h4><a name="toString">toString</a></h4>
|
|
<div class="detail">
|
|
<code>
|
|
String
|
|
<strong>toString</strong>
|
|
()
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
toString method
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Returns:</dt>
|
|
<dd> string represenation of anim obj</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ============ METHOD DETAIL END ========== -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
|
|
|
|
<div id="footer">
|
|
<hr />
|
|
Copyright © 2004 - 2005 Yahoo! Inc. All rights reserved.
|
|
<br />
|
|
Yahoo! Confidential.
|
|
<br /><br />
|
|
Documentation generated by <a href="http://jsdoc.sourceforge.net/">JSDoc</a>
|
|
version 1.9.5.8
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html> |