<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
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
* @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
* @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
* @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
* @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
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