Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / Animate.html
index a44fd11..f57b527 100644 (file)
@@ -1,9 +1,26 @@
-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-util.Animate'>/**
+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>The source code</title>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+  <style type="text/css">
+    .highlight { display: block; background-color: #ddd; }
+  </style>
+  <script type="text/javascript">
+    function highlight() {
+      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+    }
+  </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+  <pre class="prettyprint lang-js"><span id='Ext-util-Animate'>/**
 </span> * @class Ext.util.Animate
  * This animation class is a mixin.
  * 
  * Ext.util.Animate provides an API for the creation of animated transitions of properties and styles.  
- * This class is used as a mixin and currently applied to {@link Ext.core.Element}, {@link Ext.CompositeElement}, 
+ * This class is used as a mixin and currently applied to {@link Ext.Element}, {@link Ext.CompositeElement}, 
  * {@link Ext.draw.Sprite}, {@link Ext.draw.CompositeSprite}, and {@link Ext.Component}.  Note that Components 
  * have a limited subset of what attributes can be animated such as top, left, x, y, height, width, and 
  * opacity (color, paddings, and margins can not be animated).
  * 
  * ## Animation Keyframes
  *
- * You can also set up complex animations with {@link Ext.fx.Anim#keyframe keyframe} which follows the 
+ * You can also set up complex animations with {@link Ext.fx.Anim#keyframes keyframes} which follow the 
  * CSS3 Animation configuration pattern. Note rotation, translation, and scaling can only be done for sprites. 
  * The previous example can be written with the following syntax:
  * 
  * 
  * ## Animation Events
  * 
- * Each animation you create has events for {@link Ext.fx.Anim#beforeanimation beforeanimation}, 
+ * Each animation you create has events for {@link Ext.fx.Anim#beforeanimate beforeanimate}, 
  * {@link Ext.fx.Anim#afteranimate afteranimate}, and {@link Ext.fx.Anim#lastframe lastframe}.  
  * Keyframed animations adds an additional {@link Ext.fx.Animator#keyframe keyframe} event which 
  * fires for each keyframe in your animation.
@@ -204,9 +221,9 @@ Ext.define('Ext.util.Animate', {
 
     uses: ['Ext.fx.Manager', 'Ext.fx.Anim'],
 
-<span id='Ext-util.Animate-method-animate'>    /**
+<span id='Ext-util-Animate-method-animate'>    /**
 </span>     * &lt;p&gt;Perform custom animation on this object.&lt;p&gt;
-     * &lt;p&gt;This method is applicable to both the the {@link Ext.Component Component} class and the {@link Ext.core.Element Element} class.
+     * &lt;p&gt;This method is applicable to both the {@link Ext.Component Component} class and the {@link Ext.Element Element} class.
      * It performs animated transitions of certain properties of this object over a specified timeline.&lt;/p&gt;
      * &lt;p&gt;The sole parameter is an object which specifies start property values, end property values, and properties which
      * describe the timeline. Of the properties listed below, only &lt;b&gt;&lt;code&gt;to&lt;/code&gt;&lt;/b&gt; is mandatory.&lt;/p&gt;
@@ -233,7 +250,7 @@ Ext.define('Ext.util.Animate', {
      * &lt;li&gt;&lt;code&gt;listeners&lt;/code&gt; &lt;div class=&quot;sub-desc&quot;&gt;This is a standard {@link Ext.util.Observable#listeners listeners} configuration object which may be used
      * to inject behaviour at either the &lt;code&gt;beforeanimate&lt;/code&gt; event or the &lt;code&gt;afteranimate&lt;/code&gt; event.&lt;/div&gt;&lt;/li&gt;
      * &lt;/ul&gt;&lt;/p&gt;
-     * &lt;h3&gt;Animating an {@link Ext.core.Element Element}&lt;/h3&gt;
+     * &lt;h3&gt;Animating an {@link Ext.Element Element}&lt;/h3&gt;
      * When animating an Element, the following properties may be specified in &lt;code&gt;from&lt;/code&gt;, &lt;code&gt;to&lt;/code&gt;, and &lt;code&gt;keyframe&lt;/code&gt; objects:&lt;ul&gt;
      * &lt;li&gt;&lt;code&gt;x&lt;/code&gt; &lt;div class=&quot;sub-desc&quot;&gt;The page X position in pixels.&lt;/div&gt;&lt;/li&gt;
      * &lt;li&gt;&lt;code&gt;y&lt;/code&gt; &lt;div class=&quot;sub-desc&quot;&gt;The page Y position in pixels&lt;/div&gt;&lt;/li&gt;
@@ -323,60 +340,68 @@ myWindow.header.el.on('click', function() {
         }, config);
     },
 
-<span id='Ext-util.Animate-property-stopFx'>    /**
-</span>     * Stops any running effects and clears this object's internal effects queue if it contains
+<span id='Ext-util-Animate-method-stopFx'>    /**
+</span>     * @deprecated 4.0 Replaced by {@link #stopAnimation}
+     * Stops any running effects and clears this object's internal effects queue if it contains
      * any additional effects that haven't started yet.
-     * @return {Ext.core.Element} The Element
+     * @return {Ext.Element} The Element
+     * @method
      */
     stopFx: Ext.Function.alias(Ext.util.Animate, 'stopAnimation'),
 
-<span id='Ext-util.Animate-method-stopAnimation'>    /**
-</span>     * @deprecated 4.0 Replaced by {@link #stopAnimation}
-     * Stops any running effects and clears this object's internal effects queue if it contains
+<span id='Ext-util-Animate-method-stopAnimation'>    /**
+</span>     * Stops any running effects and clears this object's internal effects queue if it contains
      * any additional effects that haven't started yet.
-     * @return {Ext.core.Element} The Element
+     * @return {Ext.Element} The Element
      */
     stopAnimation: function() {
         Ext.fx.Manager.stopAnimation(this.id);
+        return this;
     },
 
-<span id='Ext-util.Animate-method-syncFx'>    /**
+<span id='Ext-util-Animate-method-syncFx'>    /**
 </span>     * Ensures that all effects queued after syncFx is called on this object are
      * run concurrently.  This is the opposite of {@link #sequenceFx}.
-     * @return {Ext.core.Element} The Element
+     * @return {Object} this
      */
     syncFx: function() {
         Ext.fx.Manager.setFxDefaults(this.id, {
             concurrent: true
         });
+        return this;
     },
 
-<span id='Ext-util.Animate-method-sequenceFx'>    /**
+<span id='Ext-util-Animate-method-sequenceFx'>    /**
 </span>     * Ensures that all effects queued after sequenceFx is called on this object are
      * run in sequence.  This is the opposite of {@link #syncFx}.
-     * @return {Ext.core.Element} The Element
+     * @return {Object} this
      */
     sequenceFx: function() {
         Ext.fx.Manager.setFxDefaults(this.id, {
             concurrent: false
         });
+        return this;
     },
 
-<span id='Ext-util.Animate-property-hasActiveFx'>    /**
+<span id='Ext-util-Animate-method-hasActiveFx'>    /**
 </span>     * @deprecated 4.0 Replaced by {@link #getActiveAnimation}
-     * Returns thq current animation if this object has any effects actively running or queued, else returns false.
-     * @return {Mixed} anim if element has active effects, else false
+     * @alias Ext.util.Animate#getActiveAnimation
+     * @method
      */
     hasActiveFx: Ext.Function.alias(Ext.util.Animate, 'getActiveAnimation'),
 
-<span id='Ext-util.Animate-method-getActiveAnimation'>    /**
-</span>     * Returns thq current animation if this object has any effects actively running or queued, else returns false.
-     * @return {Mixed} anim if element has active effects, else false
+<span id='Ext-util-Animate-method-getActiveAnimation'>    /**
+</span>     * Returns the current animation if this object has any effects actively running or queued, else returns false.
+     * @return {Ext.fx.Anim/Boolean} Anim if element has active effects, else false
      */
     getActiveAnimation: function() {
         return Ext.fx.Manager.getActiveAnimation(this.id);
     }
-});
-
-// Apply Animate mixin manually until Element is defined in the proper 4.x way
-Ext.applyIf(Ext.core.Element.prototype, Ext.util.Animate.prototype);</pre></pre></body></html>
\ No newline at end of file
+}, function(){
+    // Apply Animate mixin manually until Element is defined in the proper 4.x way
+    Ext.applyIf(Ext.Element.prototype, this.prototype);
+    // We need to call this again so the animation methods get copied over to CE
+    Ext.CompositeElementLite.importElementMethods();
+});</pre>
+</body>
+</html>