Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / src / core / core / Element.position.js
index 0c3d414..89108ee 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.0.3
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -19,10 +19,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
        /**\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
@@ -66,7 +62,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
     /**\r
@@ -76,7 +72,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
     /**\r
@@ -145,7 +141,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
     /**\r
@@ -157,7 +153,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
     /**\r
@@ -298,6 +294,8 @@ 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
 })();
\ No newline at end of file