Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / Element.position.html
index 3280048..8495b08 100644 (file)
@@ -1,5 +1,6 @@
 <html>\r
 <head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
   <title>The source code</title>\r
     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
@@ -20,10 +21,6 @@ var D = Ext.lib.Dom,
         AUTO = "auto",\r
         ZINDEX = "z-index";\r
 \r
-function animTest(args, animate, i) {\r
-       return this.preanim && !!animate ? this.preanim(args, i) : false        \r
-}\r
-\r
 Ext.Element.addMethods({\r
        <div id="method-Ext.Element-getX"></div>/**\r
       * Gets the current X position of the element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).\r
@@ -67,7 +64,7 @@ Ext.Element.addMethods({
      * @return {Ext.Element} this\r
      */\r
     setX : function(x, animate){           \r
-           return this.setXY([x, this.getY()], animTest.call(this, arguments, animate, 1));\r
+           return this.setXY([x, this.getY()], this.animTest(arguments, animate, 1));\r
     },\r
 \r
     <div id="method-Ext.Element-setY"></div>/**\r
@@ -77,7 +74,7 @@ Ext.Element.addMethods({
      * @return {Ext.Element} this\r
      */\r
     setY : function(y, animate){           \r
-           return this.setXY([this.getX(), y], animTest.call(this, arguments, animate, 1));\r
+           return this.setXY([this.getX(), y], this.animTest(arguments, animate, 1));\r
     },\r
 \r
     <div id="method-Ext.Element-setLeft"></div>/**\r
@@ -146,7 +143,7 @@ Ext.Element.addMethods({
      * @return {Ext.Element} this\r
      */\r
     setLocation : function(x, y, animate){\r
-        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));\r
+        return this.setXY([x, y], this.animTest(arguments, animate, 2));\r
     },\r
 \r
     <div id="method-Ext.Element-moveTo"></div>/**\r
@@ -158,7 +155,7 @@ Ext.Element.addMethods({
      * @return {Ext.Element} this\r
      */\r
     moveTo : function(x, y, animate){\r
-        return this.setXY([x, y], animTest.call(this, arguments, animate, 2));        \r
+        return this.setXY([x, y], this.animTest(arguments, animate, 2));        \r
     },    \r
     \r
     <div id="method-Ext.Element-getLeft"></div>/**\r
@@ -299,7 +296,9 @@ Ext.Element.addMethods({
         return {left: (x - o[0] + l), top: (y - o[1] + t)}; \r
     },\r
     \r
-    animTest : animTest\r
+    animTest : function(args, animate, i) {\r
+        return !!animate && this.preanim ? this.preanim(args, i) : false;\r
+    }\r
 });\r
 })();</pre>    \r
 </body>\r