You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1126 lines
42 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js">(function(){
  19. // contants
  20. var NULL = null,
  21. UNDEFINED = undefined,
  22. TRUE = true,
  23. FALSE = false,
  24. SETX = &quot;setX&quot;,
  25. SETY = &quot;setY&quot;,
  26. SETXY = &quot;setXY&quot;,
  27. LEFT = &quot;left&quot;,
  28. BOTTOM = &quot;bottom&quot;,
  29. TOP = &quot;top&quot;,
  30. RIGHT = &quot;right&quot;,
  31. HEIGHT = &quot;height&quot;,
  32. WIDTH = &quot;width&quot;,
  33. POINTS = &quot;points&quot;,
  34. HIDDEN = &quot;hidden&quot;,
  35. ABSOLUTE = &quot;absolute&quot;,
  36. VISIBLE = &quot;visible&quot;,
  37. MOTION = &quot;motion&quot;,
  38. POSITION = &quot;position&quot;,
  39. EASEOUT = &quot;easeOut&quot;,
  40. /*
  41. * Use a light flyweight here since we are using so many callbacks and are always assured a DOM element
  42. */
  43. flyEl = new Ext.Element.Flyweight(),
  44. queues = {},
  45. getObject = function(o){
  46. return o || {};
  47. },
  48. fly = function(dom){
  49. flyEl.dom = dom;
  50. flyEl.id = Ext.id(dom);
  51. return flyEl;
  52. },
  53. /*
  54. * Queueing now stored outside of the element due to closure issues
  55. */
  56. getQueue = function(id){
  57. if(!queues[id]){
  58. queues[id] = [];
  59. }
  60. return queues[id];
  61. },
  62. setQueue = function(id, value){
  63. queues[id] = value;
  64. };
  65. //Notifies Element that fx methods are available
  66. Ext.enableFx = TRUE;
  67. <span id='Ext-Fx-cfg-stopFx'><span id='Ext-Fx-cfg-concurrent'><span id='Ext-Fx-cfg-block'><span id='Ext-Fx-cfg-afterStyle'><span id='Ext-Fx-cfg-useDisplay'><span id='Ext-Fx-cfg-remove'><span id='Ext-Fx-cfg-endOpacity'><span id='Ext-Fx-cfg-duration'><span id='Ext-Fx-cfg-afterCls'><span id='Ext-Fx-cfg-easing'><span id='Ext-Fx-cfg-scope'><span id='Ext-Fx-cfg-callback'><span id='Ext-Fx'>/**
  68. </span></span></span></span></span></span></span></span></span></span></span></span></span> * @class Ext.Fx
  69. * &lt;p&gt;A class to provide basic animation and visual effects support. &lt;b&gt;Note:&lt;/b&gt; This class is automatically applied
  70. * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}.
  71. * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx &lt;b&gt;must&lt;/b&gt; be
  72. * {@link Ext#enableFx included} in order for the Element effects to work.&lt;/p&gt;&lt;br/&gt;
  73. *
  74. * &lt;p&gt;&lt;b&gt;&lt;u&gt;Method Chaining&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
  75. * &lt;p&gt;It is important to note that although the Fx methods and many non-Fx Element methods support &quot;method chaining&quot; in that
  76. * they return the Element object itself as the method return value, it is not always possible to mix the two in a single
  77. * method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced.
  78. * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason,
  79. * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the
  80. * expected results and should be done with care. Also see &lt;tt&gt;{@link #callback}&lt;/tt&gt;.&lt;/p&gt;&lt;br/&gt;
  81. *
  82. * &lt;p&gt;&lt;b&gt;&lt;u&gt;Anchor Options for Motion Effects&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
  83. * &lt;p&gt;Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element
  84. * that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:&lt;/p&gt;
  85. &lt;pre&gt;
  86. Value Description
  87. ----- -----------------------------
  88. tl The top left corner
  89. t The center of the top edge
  90. tr The top right corner
  91. l The center of the left edge
  92. r The center of the right edge
  93. bl The bottom left corner
  94. b The center of the bottom edge
  95. br The bottom right corner
  96. &lt;/pre&gt;
  97. * &lt;b&gt;Note&lt;/b&gt;: some Fx methods accept specific custom config parameters. The options shown in the Config Options
  98. * section below are common options that can be passed to any Fx method unless otherwise noted.&lt;/b&gt;
  99. *
  100. * @cfg {Function} callback A function called when the effect is finished. Note that effects are queued internally by the
  101. * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together
  102. * and called in sequence (see note for &lt;b&gt;&lt;u&gt;Method Chaining&lt;/u&gt;&lt;/b&gt; above), for example:&lt;pre&gt;&lt;code&gt;
  103. * el.slideIn().highlight();
  104. * &lt;/code&gt;&lt;/pre&gt;
  105. * The callback is intended for any additional code that should run once a particular effect has completed. The Element
  106. * being operated upon is passed as the first parameter.
  107. *
  108. * @cfg {Object} scope The scope (&lt;code&gt;this&lt;/code&gt; reference) in which the &lt;tt&gt;{@link #callback}&lt;/tt&gt; function is executed. Defaults to the browser window.
  109. *
  110. * @cfg {String} easing A valid Ext.lib.Easing value for the effect:&lt;/p&gt;&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
  111. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;backBoth&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  112. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;backIn&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  113. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;backOut&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  114. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;bounceBoth&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  115. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;bounceIn&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  116. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;bounceOut&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  117. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeBoth&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  118. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeBothStrong&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  119. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeIn&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  120. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeInStrong&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  121. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeNone&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  122. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeOut&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  123. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;easeOutStrong&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  124. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;elasticBoth&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  125. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;elasticIn&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  126. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;elasticOut&lt;/tt&gt;&lt;/b&gt;&lt;/li&gt;
  127. * &lt;/ul&gt;&lt;/div&gt;
  128. *
  129. * @cfg {String} afterCls A css class to apply after the effect
  130. * @cfg {Number} duration The length of time (in seconds) that the effect should last
  131. *
  132. * @cfg {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between
  133. * &lt;tt&gt;0&lt;/tt&gt; and &lt;tt&gt;1&lt;/tt&gt; inclusive to configure the ending opacity value.
  134. *
  135. * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes
  136. * @cfg {Boolean} useDisplay Whether to use the &lt;i&gt;display&lt;/i&gt; CSS property instead of &lt;i&gt;visibility&lt;/i&gt; when hiding Elements (only applies to
  137. * effects that end with the element being visually hidden, ignored otherwise)
  138. * @cfg {String/Object/Function} afterStyle A style specification string, e.g. &lt;tt&gt;&quot;width:100px&quot;&lt;/tt&gt;, or an object
  139. * in the form &lt;tt&gt;{width:&quot;100px&quot;}&lt;/tt&gt;, or a function which returns such a specification that will be applied to the
  140. * Element after the effect finishes.
  141. * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs
  142. * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence
  143. * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects)
  144. */
  145. Ext.Fx = {
  146. <span id='Ext-Fx-method-switchStatements'> // private - calls the function taking arguments from the argHash based on the key. Returns the return value of the function.
  147. </span> // this is useful for replacing switch statements (for example).
  148. switchStatements : function(key, fn, argHash){
  149. return fn.apply(this, argHash[key]);
  150. },
  151. <span id='Ext-Fx-method-slideIn'> /**
  152. </span> * Slides the element into view. An anchor point can be optionally passed to set the point of
  153. * origin for the slide effect. This function automatically handles wrapping the element with
  154. * a fixed-size container if needed. See the Fx class overview for valid anchor point options.
  155. * Usage:
  156. *&lt;pre&gt;&lt;code&gt;
  157. // default: slide the element in from the top
  158. el.slideIn();
  159. // custom: slide the element in from the right with a 2-second duration
  160. el.slideIn('r', { duration: 2 });
  161. // common config options shown with default values
  162. el.slideIn('t', {
  163. easing: 'easeOut',
  164. duration: .5
  165. });
  166. &lt;/code&gt;&lt;/pre&gt;
  167. * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
  168. * @param {Object} options (optional) Object literal with any of the Fx config options
  169. * @return {Ext.Element} The Element
  170. */
  171. slideIn : function(anchor, o){
  172. o = getObject(o);
  173. var me = this,
  174. dom = me.dom,
  175. st = dom.style,
  176. xy,
  177. r,
  178. b,
  179. wrap,
  180. after,
  181. st,
  182. args,
  183. pt,
  184. bw,
  185. bh;
  186. anchor = anchor || &quot;t&quot;;
  187. me.queueFx(o, function(){
  188. xy = fly(dom).getXY();
  189. // fix display to visibility
  190. fly(dom).fixDisplay();
  191. // restore values after effect
  192. r = fly(dom).getFxRestore();
  193. b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
  194. b.right = b.x + b.width;
  195. b.bottom = b.y + b.height;
  196. // fixed size for slide
  197. fly(dom).setWidth(b.width).setHeight(b.height);
  198. // wrap if needed
  199. wrap = fly(dom).fxWrap(r.pos, o, HIDDEN);
  200. st.visibility = VISIBLE;
  201. st.position = ABSOLUTE;
  202. // clear out temp styles after slide and unwrap
  203. function after(){
  204. fly(dom).fxUnwrap(wrap, r.pos, o);
  205. st.width = r.width;
  206. st.height = r.height;
  207. fly(dom).afterFx(o);
  208. }
  209. // time to calculate the positions
  210. pt = {to: [b.x, b.y]};
  211. bw = {to: b.width};
  212. bh = {to: b.height};
  213. function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){
  214. var ret = {};
  215. fly(wrap).setWidth(ww).setHeight(wh);
  216. if(fly(wrap)[sXY]){
  217. fly(wrap)[sXY](sXYval);
  218. }
  219. style[s1] = style[s2] = &quot;0&quot;;
  220. if(w){
  221. ret.width = w;
  222. }
  223. if(h){
  224. ret.height = h;
  225. }
  226. if(p){
  227. ret.points = p;
  228. }
  229. return ret;
  230. };
  231. args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
  232. t : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL],
  233. l : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL],
  234. r : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt],
  235. b : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt],
  236. tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt],
  237. bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt],
  238. br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt],
  239. tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt]
  240. });
  241. st.visibility = VISIBLE;
  242. fly(wrap).show();
  243. arguments.callee.anim = fly(wrap).fxanim(args,
  244. o,
  245. MOTION,
  246. .5,
  247. EASEOUT,
  248. after);
  249. });
  250. return me;
  251. },
  252. <span id='Ext-Fx-method-slideOut'> /**
  253. </span> * Slides the element out of view. An anchor point can be optionally passed to set the end point
  254. * for the slide effect. When the effect is completed, the element will be hidden (visibility =
  255. * 'hidden') but block elements will still take up space in the document. The element must be removed
  256. * from the DOM using the 'remove' config option if desired. This function automatically handles
  257. * wrapping the element with a fixed-size container if needed. See the Fx class overview for valid anchor point options.
  258. * Usage:
  259. *&lt;pre&gt;&lt;code&gt;
  260. // default: slide the element out to the top
  261. el.slideOut();
  262. // custom: slide the element out to the right with a 2-second duration
  263. el.slideOut('r', { duration: 2 });
  264. // common config options shown with default values
  265. el.slideOut('t', {
  266. easing: 'easeOut',
  267. duration: .5,
  268. remove: false,
  269. useDisplay: false
  270. });
  271. &lt;/code&gt;&lt;/pre&gt;
  272. * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
  273. * @param {Object} options (optional) Object literal with any of the Fx config options
  274. * @return {Ext.Element} The Element
  275. */
  276. slideOut : function(anchor, o){
  277. o = getObject(o);
  278. var me = this,
  279. dom = me.dom,
  280. st = dom.style,
  281. xy = me.getXY(),
  282. wrap,
  283. r,
  284. b,
  285. a,
  286. zero = {to: 0};
  287. anchor = anchor || &quot;t&quot;;
  288. me.queueFx(o, function(){
  289. // restore values after effect
  290. r = fly(dom).getFxRestore();
  291. b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
  292. b.right = b.x + b.width;
  293. b.bottom = b.y + b.height;
  294. // fixed size for slide
  295. fly(dom).setWidth(b.width).setHeight(b.height);
  296. // wrap if needed
  297. wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
  298. st.visibility = VISIBLE;
  299. st.position = ABSOLUTE;
  300. fly(wrap).setWidth(b.width).setHeight(b.height);
  301. function after(){
  302. o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
  303. fly(dom).fxUnwrap(wrap, r.pos, o);
  304. st.width = r.width;
  305. st.height = r.height;
  306. fly(dom).afterFx(o);
  307. }
  308. function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){
  309. var ret = {};
  310. style[s1] = style[s2] = &quot;0&quot;;
  311. ret[p1] = v1;
  312. if(p2){
  313. ret[p2] = v2;
  314. }
  315. if(p3){
  316. ret[p3] = v3;
  317. }
  318. return ret;
  319. };
  320. a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
  321. t : [st, LEFT, BOTTOM, HEIGHT, zero],
  322. l : [st, RIGHT, TOP, WIDTH, zero],
  323. r : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}],
  324. b : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
  325. tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero],
  326. bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}],
  327. br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
  328. tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
  329. });
  330. arguments.callee.anim = fly(wrap).fxanim(a,
  331. o,
  332. MOTION,
  333. .5,
  334. EASEOUT,
  335. after);
  336. });
  337. return me;
  338. },
  339. <span id='Ext-Fx-method-puff'> /**
  340. </span> * Fades the element out while slowly expanding it in all directions. When the effect is completed, the
  341. * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
  342. * The element must be removed from the DOM using the 'remove' config option if desired.
  343. * Usage:
  344. *&lt;pre&gt;&lt;code&gt;
  345. // default
  346. el.puff();
  347. // common config options shown with default values
  348. el.puff({
  349. easing: 'easeOut',
  350. duration: .5,
  351. remove: false,
  352. useDisplay: false
  353. });
  354. &lt;/code&gt;&lt;/pre&gt;
  355. * @param {Object} options (optional) Object literal with any of the Fx config options
  356. * @return {Ext.Element} The Element
  357. */
  358. puff : function(o){
  359. o = getObject(o);
  360. var me = this,
  361. dom = me.dom,
  362. st = dom.style,
  363. width,
  364. height,
  365. r;
  366. me.queueFx(o, function(){
  367. width = fly(dom).getWidth();
  368. height = fly(dom).getHeight();
  369. fly(dom).clearOpacity();
  370. fly(dom).show();
  371. // restore values after effect
  372. r = fly(dom).getFxRestore();
  373. function after(){
  374. o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
  375. fly(dom).clearOpacity();
  376. fly(dom).setPositioning(r.pos);
  377. st.width = r.width;
  378. st.height = r.height;
  379. st.fontSize = '';
  380. fly(dom).afterFx(o);
  381. }
  382. arguments.callee.anim = fly(dom).fxanim({
  383. width : {to : fly(dom).adjustWidth(width * 2)},
  384. height : {to : fly(dom).adjustHeight(height * 2)},
  385. points : {by : [-width * .5, -height * .5]},
  386. opacity : {to : 0},
  387. fontSize: {to : 200, unit: &quot;%&quot;}
  388. },
  389. o,
  390. MOTION,
  391. .5,
  392. EASEOUT,
  393. after);
  394. });
  395. return me;
  396. },
  397. <span id='Ext-Fx-method-switchOff'> /**
  398. </span> * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
  399. * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still
  400. * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired.
  401. * Usage:
  402. *&lt;pre&gt;&lt;code&gt;
  403. // default
  404. el.switchOff();
  405. // all config options shown with default values
  406. el.switchOff({
  407. easing: 'easeIn',
  408. duration: .3,
  409. remove: false,
  410. useDisplay: false
  411. });
  412. &lt;/code&gt;&lt;/pre&gt;
  413. * @param {Object} options (optional) Object literal with any of the Fx config options
  414. * @return {Ext.Element} The Element
  415. */
  416. switchOff : function(o){
  417. o = getObject(o);
  418. var me = this,
  419. dom = me.dom,
  420. st = dom.style,
  421. r;
  422. me.queueFx(o, function(){
  423. fly(dom).clearOpacity();
  424. fly(dom).clip();
  425. // restore values after effect
  426. r = fly(dom).getFxRestore();
  427. function after(){
  428. o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
  429. fly(dom).clearOpacity();
  430. fly(dom).setPositioning(r.pos);
  431. st.width = r.width;
  432. st.height = r.height;
  433. fly(dom).afterFx(o);
  434. };
  435. fly(dom).fxanim({opacity : {to : 0.3}},
  436. NULL,
  437. NULL,
  438. .1,
  439. NULL,
  440. function(){
  441. fly(dom).clearOpacity();
  442. (function(){
  443. fly(dom).fxanim({
  444. height : {to : 1},
  445. points : {by : [0, fly(dom).getHeight() * .5]}
  446. },
  447. o,
  448. MOTION,
  449. 0.3,
  450. 'easeIn',
  451. after);
  452. }).defer(100);
  453. });
  454. });
  455. return me;
  456. },
  457. <span id='Ext-Fx-method-highlight'> /**
  458. </span> * Highlights the Element by setting a color (applies to the background-color by default, but can be
  459. * changed using the &quot;attr&quot; config option) and then fading back to the original color. If no original
  460. * color is available, you should provide the &quot;endColor&quot; config option which will be cleared after the animation.
  461. * Usage:
  462. &lt;pre&gt;&lt;code&gt;
  463. // default: highlight background to yellow
  464. el.highlight();
  465. // custom: highlight foreground text to blue for 2 seconds
  466. el.highlight(&quot;0000ff&quot;, { attr: 'color', duration: 2 });
  467. // common config options shown with default values
  468. el.highlight(&quot;ffff9c&quot;, {
  469. attr: &quot;background-color&quot;, //can be any valid CSS property (attribute) that supports a color value
  470. endColor: (current color) or &quot;ffffff&quot;,
  471. easing: 'easeIn',
  472. duration: 1
  473. });
  474. &lt;/code&gt;&lt;/pre&gt;
  475. * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')
  476. * @param {Object} options (optional) Object literal with any of the Fx config options
  477. * @return {Ext.Element} The Element
  478. */
  479. highlight : function(color, o){
  480. o = getObject(o);
  481. var me = this,
  482. dom = me.dom,
  483. attr = o.attr || &quot;backgroundColor&quot;,
  484. a = {},
  485. restore;
  486. me.queueFx(o, function(){
  487. fly(dom).clearOpacity();
  488. fly(dom).show();
  489. function after(){
  490. dom.style[attr] = restore;
  491. fly(dom).afterFx(o);
  492. }
  493. restore = dom.style[attr];
  494. a[attr] = {from: color || &quot;ffff9c&quot;, to: o.endColor || fly(dom).getColor(attr) || &quot;ffffff&quot;};
  495. arguments.callee.anim = fly(dom).fxanim(a,
  496. o,
  497. 'color',
  498. 1,
  499. 'easeIn',
  500. after);
  501. });
  502. return me;
  503. },
  504. <span id='Ext-Fx-method-frame'> /**
  505. </span> * Shows a ripple of exploding, attenuating borders to draw attention to an Element.
  506. * Usage:
  507. &lt;pre&gt;&lt;code&gt;
  508. // default: a single light blue ripple
  509. el.frame();
  510. // custom: 3 red ripples lasting 3 seconds total
  511. el.frame(&quot;ff0000&quot;, 3, { duration: 3 });
  512. // common config options shown with default values
  513. el.frame(&quot;C3DAF9&quot;, 1, {
  514. duration: 1 //duration of each individual ripple.
  515. // Note: Easing is not configurable and will be ignored if included
  516. });
  517. &lt;/code&gt;&lt;/pre&gt;
  518. * @param {String} color (optional) The color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').
  519. * @param {Number} count (optional) The number of ripples to display (defaults to 1)
  520. * @param {Object} options (optional) Object literal with any of the Fx config options
  521. * @return {Ext.Element} The Element
  522. */
  523. frame : function(color, count, o){
  524. o = getObject(o);
  525. var me = this,
  526. dom = me.dom,
  527. proxy,
  528. active;
  529. me.queueFx(o, function(){
  530. color = color || '#C3DAF9';
  531. if(color.length == 6){
  532. color = '#' + color;
  533. }
  534. count = count || 1;
  535. fly(dom).show();
  536. var xy = fly(dom).getXY(),
  537. b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight},
  538. queue = function(){
  539. proxy = fly(document.body || document.documentElement).createChild({
  540. style:{
  541. position : ABSOLUTE,
  542. 'z-index': 35000, // yee haw
  543. border : '0px solid ' + color
  544. }
  545. });
  546. return proxy.queueFx({}, animFn);
  547. };
  548. arguments.callee.anim = {
  549. isAnimated: true,
  550. stop: function() {
  551. count = 0;
  552. proxy.stopFx();
  553. }
  554. };
  555. function animFn(){
  556. var scale = Ext.isBorderBox ? 2 : 1;
  557. active = proxy.anim({
  558. top : {from : b.y, to : b.y - 20},
  559. left : {from : b.x, to : b.x - 20},
  560. borderWidth : {from : 0, to : 10},
  561. opacity : {from : 1, to : 0},
  562. height : {from : b.height, to : b.height + 20 * scale},
  563. width : {from : b.width, to : b.width + 20 * scale}
  564. },{
  565. duration: o.duration || 1,
  566. callback: function() {
  567. proxy.remove();
  568. --count &gt; 0 ? queue() : fly(dom).afterFx(o);
  569. }
  570. });
  571. arguments.callee.anim = {
  572. isAnimated: true,
  573. stop: function(){
  574. active.stop();
  575. }
  576. };
  577. };
  578. queue();
  579. });
  580. return me;
  581. },
  582. <span id='Ext-Fx-method-pause'> /**
  583. </span> * Creates a pause before any subsequent queued effects begin. If there are
  584. * no effects queued after the pause it will have no effect.
  585. * Usage:
  586. &lt;pre&gt;&lt;code&gt;
  587. el.pause(1);
  588. &lt;/code&gt;&lt;/pre&gt;
  589. * @param {Number} seconds The length of time to pause (in seconds)
  590. * @return {Ext.Element} The Element
  591. */
  592. pause : function(seconds){
  593. var dom = this.dom,
  594. t;
  595. this.queueFx({}, function(){
  596. t = setTimeout(function(){
  597. fly(dom).afterFx({});
  598. }, seconds * 1000);
  599. arguments.callee.anim = {
  600. isAnimated: true,
  601. stop: function(){
  602. clearTimeout(t);
  603. fly(dom).afterFx({});
  604. }
  605. };
  606. });
  607. return this;
  608. },
  609. <span id='Ext-Fx-method-fadeIn'> /**
  610. </span> * Fade an element in (from transparent to opaque). The ending opacity can be specified
  611. * using the &lt;tt&gt;{@link #endOpacity}&lt;/tt&gt; config option.
  612. * Usage:
  613. &lt;pre&gt;&lt;code&gt;
  614. // default: fade in from opacity 0 to 100%
  615. el.fadeIn();
  616. // custom: fade in from opacity 0 to 75% over 2 seconds
  617. el.fadeIn({ endOpacity: .75, duration: 2});
  618. // common config options shown with default values
  619. el.fadeIn({
  620. endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
  621. easing: 'easeOut',
  622. duration: .5
  623. });
  624. &lt;/code&gt;&lt;/pre&gt;
  625. * @param {Object} options (optional) Object literal with any of the Fx config options
  626. * @return {Ext.Element} The Element
  627. */
  628. fadeIn : function(o){
  629. o = getObject(o);
  630. var me = this,
  631. dom = me.dom,
  632. to = o.endOpacity || 1;
  633. me.queueFx(o, function(){
  634. fly(dom).setOpacity(0);
  635. fly(dom).fixDisplay();
  636. dom.style.visibility = VISIBLE;
  637. arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}},
  638. o, NULL, .5, EASEOUT, function(){
  639. if(to == 1){
  640. fly(dom).clearOpacity();
  641. }
  642. fly(dom).afterFx(o);
  643. });
  644. });
  645. return me;
  646. },
  647. <span id='Ext-Fx-method-fadeOut'> /**
  648. </span> * Fade an element out (from opaque to transparent). The ending opacity can be specified
  649. * using the &lt;tt&gt;{@link #endOpacity}&lt;/tt&gt; config option. Note that IE may require
  650. * &lt;tt&gt;{@link #useDisplay}:true&lt;/tt&gt; in order to redisplay correctly.
  651. * Usage:
  652. &lt;pre&gt;&lt;code&gt;
  653. // default: fade out from the element's current opacity to 0
  654. el.fadeOut();
  655. // custom: fade out from the element's current opacity to 25% over 2 seconds
  656. el.fadeOut({ endOpacity: .25, duration: 2});
  657. // common config options shown with default values
  658. el.fadeOut({
  659. endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
  660. easing: 'easeOut',
  661. duration: .5,
  662. remove: false,
  663. useDisplay: false
  664. });
  665. &lt;/code&gt;&lt;/pre&gt;
  666. * @param {Object} options (optional) Object literal with any of the Fx config options
  667. * @return {Ext.Element} The Element
  668. */
  669. fadeOut : function(o){
  670. o = getObject(o);
  671. var me = this,
  672. dom = me.dom,
  673. style = dom.style,
  674. to = o.endOpacity || 0;
  675. me.queueFx(o, function(){
  676. arguments.callee.anim = fly(dom).fxanim({
  677. opacity : {to : to}},
  678. o,
  679. NULL,
  680. .5,
  681. EASEOUT,
  682. function(){
  683. if(to == 0){
  684. Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ?
  685. style.display = &quot;none&quot; :
  686. style.visibility = HIDDEN;
  687. fly(dom).clearOpacity();
  688. }
  689. fly(dom).afterFx(o);
  690. });
  691. });
  692. return me;
  693. },
  694. <span id='Ext-Fx-method-scale'> /**
  695. </span> * Animates the transition of an element's dimensions from a starting height/width
  696. * to an ending height/width. This method is a convenience implementation of {@link shift}.
  697. * Usage:
  698. &lt;pre&gt;&lt;code&gt;
  699. // change height and width to 100x100 pixels
  700. el.scale(100, 100);
  701. // common config options shown with default values. The height and width will default to
  702. // the element&amp;#39;s existing values if passed as null.
  703. el.scale(
  704. [element&amp;#39;s width],
  705. [element&amp;#39;s height], {
  706. easing: 'easeOut',
  707. duration: .35
  708. }
  709. );
  710. &lt;/code&gt;&lt;/pre&gt;
  711. * @param {Number} width The new width (pass undefined to keep the original width)
  712. * @param {Number} height The new height (pass undefined to keep the original height)
  713. * @param {Object} options (optional) Object literal with any of the Fx config options
  714. * @return {Ext.Element} The Element
  715. */
  716. scale : function(w, h, o){
  717. this.shift(Ext.apply({}, o, {
  718. width: w,
  719. height: h
  720. }));
  721. return this;
  722. },
  723. <span id='Ext-Fx-method-shift'> /**
  724. </span> * Animates the transition of any combination of an element's dimensions, xy position and/or opacity.
  725. * Any of these properties not specified in the config object will not be changed. This effect
  726. * requires that at least one new dimension, position or opacity setting must be passed in on
  727. * the config object in order for the function to have any effect.
  728. * Usage:
  729. &lt;pre&gt;&lt;code&gt;
  730. // slide the element horizontally to x position 200 while changing the height and opacity
  731. el.shift({ x: 200, height: 50, opacity: .8 });
  732. // common config options shown with default values.
  733. el.shift({
  734. width: [element&amp;#39;s width],
  735. height: [element&amp;#39;s height],
  736. x: [element&amp;#39;s x position],
  737. y: [element&amp;#39;s y position],
  738. opacity: [element&amp;#39;s opacity],
  739. easing: 'easeOut',
  740. duration: .35
  741. });
  742. &lt;/code&gt;&lt;/pre&gt;
  743. * @param {Object} options Object literal with any of the Fx config options
  744. * @return {Ext.Element} The Element
  745. */
  746. shift : function(o){
  747. o = getObject(o);
  748. var dom = this.dom,
  749. a = {};
  750. this.queueFx(o, function(){
  751. for (var prop in o) {
  752. if (o[prop] != UNDEFINED) {
  753. a[prop] = {to : o[prop]};
  754. }
  755. }
  756. a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
  757. a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;
  758. if (a.x || a.y || a.xy) {
  759. a.points = a.xy ||
  760. {to : [ a.x ? a.x.to : fly(dom).getX(),
  761. a.y ? a.y.to : fly(dom).getY()]};
  762. }
  763. arguments.callee.anim = fly(dom).fxanim(a,
  764. o,
  765. MOTION,
  766. .35,
  767. EASEOUT,
  768. function(){
  769. fly(dom).afterFx(o);
  770. });
  771. });
  772. return this;
  773. },
  774. <span id='Ext-Fx-method-ghost'> /**
  775. </span> * Slides the element while fading it out of view. An anchor point can be optionally passed to set the
  776. * ending point of the effect.
  777. * Usage:
  778. *&lt;pre&gt;&lt;code&gt;
  779. // default: slide the element downward while fading out
  780. el.ghost();
  781. // custom: slide the element out to the right with a 2-second duration
  782. el.ghost('r', { duration: 2 });
  783. // common config options shown with default values
  784. el.ghost('b', {
  785. easing: 'easeOut',
  786. duration: .5,
  787. remove: false,
  788. useDisplay: false
  789. });
  790. &lt;/code&gt;&lt;/pre&gt;
  791. * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
  792. * @param {Object} options (optional) Object literal with any of the Fx config options
  793. * @return {Ext.Element} The Element
  794. */
  795. ghost : function(anchor, o){
  796. o = getObject(o);
  797. var me = this,
  798. dom = me.dom,
  799. st = dom.style,
  800. a = {opacity: {to: 0}, points: {}},
  801. pt = a.points,
  802. r,
  803. w,
  804. h;
  805. anchor = anchor || &quot;b&quot;;
  806. me.queueFx(o, function(){
  807. // restore values after effect
  808. r = fly(dom).getFxRestore();
  809. w = fly(dom).getWidth();
  810. h = fly(dom).getHeight();
  811. function after(){
  812. o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
  813. fly(dom).clearOpacity();
  814. fly(dom).setPositioning(r.pos);
  815. st.width = r.width;
  816. st.height = r.height;
  817. fly(dom).afterFx(o);
  818. }
  819. pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, {
  820. t : [0, -h],
  821. l : [-w, 0],
  822. r : [w, 0],
  823. b : [0, h],
  824. tl : [-w, -h],
  825. bl : [-w, h],
  826. br : [w, h],
  827. tr : [w, -h]
  828. });
  829. arguments.callee.anim = fly(dom).fxanim(a,
  830. o,
  831. MOTION,
  832. .5,
  833. EASEOUT, after);
  834. });
  835. return me;
  836. },
  837. <span id='Ext-Fx-method-syncFx'> /**
  838. </span> * Ensures that all effects queued after syncFx is called on the element are
  839. * run concurrently. This is the opposite of {@link #sequenceFx}.
  840. * @return {Ext.Element} The Element
  841. */
  842. syncFx : function(){
  843. var me = this;
  844. me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
  845. block : FALSE,
  846. concurrent : TRUE,
  847. stopFx : FALSE
  848. });
  849. return me;
  850. },
  851. <span id='Ext-Fx-method-sequenceFx'> /**
  852. </span> * Ensures that all effects queued after sequenceFx is called on the element are
  853. * run in sequence. This is the opposite of {@link #syncFx}.
  854. * @return {Ext.Element} The Element
  855. */
  856. sequenceFx : function(){
  857. var me = this;
  858. me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
  859. block : FALSE,
  860. concurrent : FALSE,
  861. stopFx : FALSE
  862. });
  863. return me;
  864. },
  865. <span id='Ext-Fx-method-nextFx'> /* @private */
  866. </span> nextFx : function(){
  867. var ef = getQueue(this.dom.id)[0];
  868. if(ef){
  869. ef.call(this);
  870. }
  871. },
  872. <span id='Ext-Fx-method-hasActiveFx'> /**
  873. </span> * Returns true if the element has any effects actively running or queued, else returns false.
  874. * @return {Boolean} True if element has active effects, else false
  875. */
  876. hasActiveFx : function(){
  877. return getQueue(this.dom.id)[0];
  878. },
  879. <span id='Ext-Fx-method-stopFx'> /**
  880. </span> * Stops any running effects and clears the element's internal effects queue if it contains
  881. * any additional effects that haven't started yet.
  882. * @return {Ext.Element} The Element
  883. */
  884. stopFx : function(finish){
  885. var me = this,
  886. id = me.dom.id;
  887. if(me.hasActiveFx()){
  888. var cur = getQueue(id)[0];
  889. if(cur &amp;&amp; cur.anim){
  890. if(cur.anim.isAnimated){
  891. setQueue(id, [cur]); //clear
  892. cur.anim.stop(finish !== undefined ? finish : TRUE);
  893. }else{
  894. setQueue(id, []);
  895. }
  896. }
  897. }
  898. return me;
  899. },
  900. <span id='Ext-Fx-method-beforeFx'> /* @private */
  901. </span> beforeFx : function(o){
  902. if(this.hasActiveFx() &amp;&amp; !o.concurrent){
  903. if(o.stopFx){
  904. this.stopFx();
  905. return TRUE;
  906. }
  907. return FALSE;
  908. }
  909. return TRUE;
  910. },
  911. <span id='Ext-Fx-method-hasFxBlock'> /**
  912. </span> * Returns true if the element is currently blocking so that no other effect can be queued
  913. * until this effect is finished, else returns false if blocking is not set. This is commonly
  914. * used to ensure that an effect initiated by a user action runs to completion prior to the
  915. * same effect being restarted (e.g., firing only one effect even if the user clicks several times).
  916. * @return {Boolean} True if blocking, else false
  917. */
  918. hasFxBlock : function(){
  919. var q = getQueue(this.dom.id);
  920. return q &amp;&amp; q[0] &amp;&amp; q[0].block;
  921. },
  922. <span id='Ext-Fx-method-queueFx'> /* @private */
  923. </span> queueFx : function(o, fn){
  924. var me = fly(this.dom);
  925. if(!me.hasFxBlock()){
  926. Ext.applyIf(o, me.fxDefaults);
  927. if(!o.concurrent){
  928. var run = me.beforeFx(o);
  929. fn.block = o.block;
  930. getQueue(me.dom.id).push(fn);
  931. if(run){
  932. me.nextFx();
  933. }
  934. }else{
  935. fn.call(me);
  936. }
  937. }
  938. return me;
  939. },
  940. <span id='Ext-Fx-method-fxWrap'> /* @private */
  941. </span> fxWrap : function(pos, o, vis){
  942. var dom = this.dom,
  943. wrap,
  944. wrapXY;
  945. if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){
  946. if(o.fixPosition){
  947. wrapXY = fly(dom).getXY();
  948. }
  949. var div = document.createElement(&quot;div&quot;);
  950. div.style.visibility = vis;
  951. wrap = dom.parentNode.insertBefore(div, dom);
  952. fly(wrap).setPositioning(pos);
  953. if(fly(wrap).isStyle(POSITION, &quot;static&quot;)){
  954. fly(wrap).position(&quot;relative&quot;);
  955. }
  956. fly(dom).clearPositioning('auto');
  957. fly(wrap).clip();
  958. wrap.appendChild(dom);
  959. if(wrapXY){
  960. fly(wrap).setXY(wrapXY);
  961. }
  962. }
  963. return wrap;
  964. },
  965. <span id='Ext-Fx-method-fxUnwrap'> /* @private */
  966. </span> fxUnwrap : function(wrap, pos, o){
  967. var dom = this.dom;
  968. fly(dom).clearPositioning();
  969. fly(dom).setPositioning(pos);
  970. if(!o.wrap){
  971. var pn = fly(wrap).dom.parentNode;
  972. pn.insertBefore(dom, wrap);
  973. fly(wrap).remove();
  974. }
  975. },
  976. <span id='Ext-Fx-method-getFxRestore'> /* @private */
  977. </span> getFxRestore : function(){
  978. var st = this.dom.style;
  979. return {pos: this.getPositioning(), width: st.width, height : st.height};
  980. },
  981. <span id='Ext-Fx-method-afterFx'> /* @private */
  982. </span> afterFx : function(o){
  983. var dom = this.dom,
  984. id = dom.id;
  985. if(o.afterStyle){
  986. fly(dom).setStyle(o.afterStyle);
  987. }
  988. if(o.afterCls){
  989. fly(dom).addClass(o.afterCls);
  990. }
  991. if(o.remove == TRUE){
  992. fly(dom).remove();
  993. }
  994. if(o.callback){
  995. o.callback.call(o.scope, fly(dom));
  996. }
  997. if(!o.concurrent){
  998. getQueue(id).shift();
  999. fly(dom).nextFx();
  1000. }
  1001. },
  1002. <span id='Ext-Fx-method-fxanim'> /* @private */
  1003. </span> fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
  1004. animType = animType || 'run';
  1005. opt = opt || {};
  1006. var anim = Ext.lib.Anim[animType](
  1007. this.dom,
  1008. args,
  1009. (opt.duration || defaultDur) || .35,
  1010. (opt.easing || defaultEase) || EASEOUT,
  1011. cb,
  1012. this
  1013. );
  1014. opt.anim = anim;
  1015. return anim;
  1016. }
  1017. };
  1018. // backwards compat
  1019. Ext.Fx.resize = Ext.Fx.scale;
  1020. //When included, Ext.Fx is automatically applied to Element so that all basic
  1021. //effects are available directly via the Element API
  1022. Ext.Element.addMethods(Ext.Fx);
  1023. })();
  1024. </pre>
  1025. </body>
  1026. </html>