2 * Ext JS Library 2.2.1
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
10 //Notifies Element that fx methods are available
\r
11 Ext.enableFx = true;
\r
15 * <p>A class to provide basic animation and visual effects support. <b>Note:</b> This class is automatically applied
\r
16 * to the {@link Ext.Element} interface when included, so all effects calls should be performed via Element.
\r
17 * Conversely, since the effects are not actually defined in Element, Ext.Fx <b>must</b> be included in order for the
\r
18 * Element effects to work.</p><br/>
\r
20 * <p>It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that
\r
21 * they return the Element object itself as the method return value, it is not always possible to mix the two in a single
\r
22 * method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced.
\r
23 * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason,
\r
24 * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the
\r
25 * expected results and should be done with care.</p><br/>
\r
27 * <p>Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element
\r
28 * that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:</p>
\r
31 ----- -----------------------------
\r
32 tl The top left corner
\r
33 t The center of the top edge
\r
34 tr The top right corner
\r
35 l The center of the left edge
\r
36 r The center of the right edge
\r
37 bl The bottom left corner
\r
38 b The center of the bottom edge
\r
39 br The bottom right corner
\r
41 * <b>Although some Fx methods accept specific custom config parameters, the ones shown in the Config Options section
\r
42 * below are common options that can be passed to any Fx method.</b>
\r
44 * @cfg {Function} callback A function called when the effect is finished. Note that effects are queued internally by the
\r
45 * Fx class, so do not need to use the callback parameter to specify another effect -- effects can simply be chained together
\r
46 * and called in sequence (e.g., el.slideIn().highlight();). The callback is intended for any additional code that should
\r
47 * run once a particular effect has completed. The Element being operated upon is passed as the first parameter.
\r
48 * @cfg {Object} scope The scope of the effect function
\r
49 * @cfg {String} easing A valid Easing value for the effect
\r
50 * @cfg {String} afterCls A css class to apply after the effect
\r
51 * @cfg {Number} duration The length of time (in seconds) that the effect should last
\r
52 * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes
\r
53 * @cfg {Boolean} useDisplay Whether to use the <i>display</i> CSS property instead of <i>visibility</i> when hiding Elements (only applies to
\r
54 * effects that end with the element being visually hidden, ignored otherwise)
\r
55 * @cfg {String/Object/Function} afterStyle A style specification string, e.g. "width:100px", or an object in the form {width:"100px"}, or
\r
56 * a function which returns such a specification that will be applied to the Element after the effect finishes
\r
57 * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs
\r
58 * @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
\r
59 * @cfg {Boolean} stopFx Whether subsequent effects should be stopped and removed after the current effect finishes
\r
63 * Slides the element into view. An anchor point can be optionally passed to set the point of
\r
64 * origin for the slide effect. This function automatically handles wrapping the element with
\r
65 * a fixed-size container if needed. See the Fx class overview for valid anchor point options.
\r
68 // default: slide the element in from the top
\r
71 // custom: slide the element in from the right with a 2-second duration
\r
72 el.slideIn('r', { duration: 2 });
\r
74 // common config options shown with default values
\r
80 * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
\r
81 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
82 * @return {Ext.Element} The Element
\r
84 slideIn : function(anchor, o){
\r
85 var el = this.getFxEl();
\r
88 el.queueFx(o, function(){
\r
90 anchor = anchor || "t";
\r
92 // fix display to visibility
\r
95 // restore values after effect
\r
96 var r = this.getFxRestore();
\r
97 var b = this.getBox();
\r
98 // fixed size for slide
\r
102 var wrap = this.fxWrap(r.pos, o, "hidden");
\r
104 var st = this.dom.style;
\r
105 st.visibility = "visible";
\r
106 st.position = "absolute";
\r
108 // clear out temp styles after slide and unwrap
\r
109 var after = function(){
\r
110 el.fxUnwrap(wrap, r.pos, o);
\r
111 st.width = r.width;
\r
112 st.height = r.height;
\r
115 // time to calc the positions
\r
116 var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height};
\r
118 switch(anchor.toLowerCase()){
\r
120 wrap.setSize(b.width, 0);
\r
121 st.left = st.bottom = "0";
\r
125 wrap.setSize(0, b.height);
\r
126 st.right = st.top = "0";
\r
130 wrap.setSize(0, b.height);
\r
131 wrap.setX(b.right);
\r
132 st.left = st.top = "0";
\r
133 a = {width: bw, points: pt};
\r
136 wrap.setSize(b.width, 0);
\r
137 wrap.setY(b.bottom);
\r
138 st.left = st.top = "0";
\r
139 a = {height: bh, points: pt};
\r
142 wrap.setSize(0, 0);
\r
143 st.right = st.bottom = "0";
\r
144 a = {width: bw, height: bh};
\r
147 wrap.setSize(0, 0);
\r
148 wrap.setY(b.y+b.height);
\r
149 st.right = st.top = "0";
\r
150 a = {width: bw, height: bh, points: pt};
\r
153 wrap.setSize(0, 0);
\r
154 wrap.setXY([b.right, b.bottom]);
\r
155 st.left = st.top = "0";
\r
156 a = {width: bw, height: bh, points: pt};
\r
159 wrap.setSize(0, 0);
\r
160 wrap.setX(b.x+b.width);
\r
161 st.left = st.bottom = "0";
\r
162 a = {width: bw, height: bh, points: pt};
\r
165 this.dom.style.visibility = "visible";
\r
168 arguments.callee.anim = wrap.fxanim(a,
\r
178 * Slides the element out of view. An anchor point can be optionally passed to set the end point
\r
179 * for the slide effect. When the effect is completed, the element will be hidden (visibility =
\r
180 * 'hidden') but block elements will still take up space in the document. The element must be removed
\r
181 * from the DOM using the 'remove' config option if desired. This function automatically handles
\r
182 * wrapping the element with a fixed-size container if needed. See the Fx class overview for valid anchor point options.
\r
185 // default: slide the element out to the top
\r
188 // custom: slide the element out to the right with a 2-second duration
\r
189 el.slideOut('r', { duration: 2 });
\r
191 // common config options shown with default values
\r
199 * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
\r
200 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
201 * @return {Ext.Element} The Element
\r
203 slideOut : function(anchor, o){
\r
204 var el = this.getFxEl();
\r
207 el.queueFx(o, function(){
\r
209 anchor = anchor || "t";
\r
211 // restore values after effect
\r
212 var r = this.getFxRestore();
\r
214 var b = this.getBox();
\r
215 // fixed size for slide
\r
219 var wrap = this.fxWrap(r.pos, o, "visible");
\r
221 var st = this.dom.style;
\r
222 st.visibility = "visible";
\r
223 st.position = "absolute";
\r
227 var after = function(){
\r
229 el.setDisplayed(false);
\r
234 el.fxUnwrap(wrap, r.pos, o);
\r
236 st.width = r.width;
\r
237 st.height = r.height;
\r
242 var a, zero = {to: 0};
\r
243 switch(anchor.toLowerCase()){
\r
245 st.left = st.bottom = "0";
\r
246 a = {height: zero};
\r
249 st.right = st.top = "0";
\r
253 st.left = st.top = "0";
\r
254 a = {width: zero, points: {to:[b.right, b.y]}};
\r
257 st.left = st.top = "0";
\r
258 a = {height: zero, points: {to:[b.x, b.bottom]}};
\r
261 st.right = st.bottom = "0";
\r
262 a = {width: zero, height: zero};
\r
265 st.right = st.top = "0";
\r
266 a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}};
\r
269 st.left = st.top = "0";
\r
270 a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}};
\r
273 st.left = st.bottom = "0";
\r
274 a = {width: zero, height: zero, points: {to:[b.right, b.y]}};
\r
278 arguments.callee.anim = wrap.fxanim(a,
\r
288 * Fades the element out while slowly expanding it in all directions. When the effect is completed, the
\r
289 * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
\r
290 * The element must be removed from the DOM using the 'remove' config option if desired.
\r
296 // common config options shown with default values
\r
304 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
305 * @return {Ext.Element} The Element
\r
307 puff : function(o){
\r
308 var el = this.getFxEl();
\r
311 el.queueFx(o, function(){
\r
312 this.clearOpacity();
\r
315 // restore values after effect
\r
316 var r = this.getFxRestore();
\r
317 var st = this.dom.style;
\r
319 var after = function(){
\r
321 el.setDisplayed(false);
\r
328 el.setPositioning(r.pos);
\r
329 st.width = r.width;
\r
330 st.height = r.height;
\r
335 var width = this.getWidth();
\r
336 var height = this.getHeight();
\r
338 arguments.callee.anim = this.fxanim({
\r
339 width : {to: this.adjustWidth(width * 2)},
\r
340 height : {to: this.adjustHeight(height * 2)},
\r
341 points : {by: [-(width * .5), -(height * .5)]},
\r
343 fontSize: {to:200, unit: "%"}
\r
354 * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
\r
355 * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still
\r
356 * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired.
\r
362 // all config options shown with default values
\r
370 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
371 * @return {Ext.Element} The Element
\r
373 switchOff : function(o){
\r
374 var el = this.getFxEl();
\r
377 el.queueFx(o, function(){
\r
378 this.clearOpacity();
\r
381 // restore values after effect
\r
382 var r = this.getFxRestore();
\r
383 var st = this.dom.style;
\r
385 var after = function(){
\r
387 el.setDisplayed(false);
\r
393 el.setPositioning(r.pos);
\r
394 st.width = r.width;
\r
395 st.height = r.height;
\r
400 this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){
\r
401 this.clearOpacity();
\r
405 points:{by:[0, this.getHeight() * .5]}
\r
406 }, o, 'motion', 0.3, 'easeIn', after);
\r
407 }).defer(100, this);
\r
414 * Highlights the Element by setting a color (applies to the background-color by default, but can be
\r
415 * changed using the "attr" config option) and then fading back to the original color. If no original
\r
416 * color is available, you should provide the "endColor" config option which will be cleared after the animation.
\r
419 // default: highlight background to yellow
\r
422 // custom: highlight foreground text to blue for 2 seconds
\r
423 el.highlight("0000ff", { attr: 'color', duration: 2 });
\r
425 // common config options shown with default values
\r
426 el.highlight("ffff9c", {
\r
427 attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
\r
428 endColor: (current color) or "ffffff",
\r
433 * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')
\r
434 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
435 * @return {Ext.Element} The Element
\r
437 highlight : function(color, o){
\r
438 var el = this.getFxEl();
\r
441 el.queueFx(o, function(){
\r
442 color = color || "ffff9c";
\r
443 var attr = o.attr || "backgroundColor";
\r
445 this.clearOpacity();
\r
448 var origColor = this.getColor(attr);
\r
449 var restoreColor = this.dom.style[attr];
\r
450 var endColor = (o.endColor || origColor) || "ffffff";
\r
452 var after = function(){
\r
453 el.dom.style[attr] = restoreColor;
\r
458 a[attr] = {from: color, to: endColor};
\r
459 arguments.callee.anim = this.fxanim(a,
\r
469 * Shows a ripple of exploding, attenuating borders to draw attention to an Element.
\r
472 // default: a single light blue ripple
\r
475 // custom: 3 red ripples lasting 3 seconds total
\r
476 el.frame("ff0000", 3, { duration: 3 });
\r
478 // common config options shown with default values
\r
479 el.frame("C3DAF9", 1, {
\r
480 duration: 1 //duration of each individual ripple.
\r
481 // Note: Easing is not configurable and will be ignored if included
\r
484 * @param {String} color (optional) The color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').
\r
485 * @param {Number} count (optional) The number of ripples to display (defaults to 1)
\r
486 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
487 * @return {Ext.Element} The Element
\r
489 frame : function(color, count, o){
\r
490 var el = this.getFxEl();
\r
493 el.queueFx(o, function(){
\r
494 color = color || "#C3DAF9";
\r
495 if(color.length == 6){
\r
496 color = "#" + color;
\r
498 count = count || 1;
\r
499 var duration = o.duration || 1;
\r
502 var b = this.getBox();
\r
503 var animFn = function(){
\r
504 var proxy = Ext.getBody().createChild({
\r
506 visbility:"hidden",
\r
507 position:"absolute",
\r
508 "z-index":"35000", // yee haw
\r
509 border:"0px solid " + color
\r
512 var scale = Ext.isBorderBox ? 2 : 1;
\r
514 top:{from:b.y, to:b.y - 20},
\r
515 left:{from:b.x, to:b.x - 20},
\r
516 borderWidth:{from:0, to:10},
\r
517 opacity:{from:1, to:0},
\r
518 height:{from:b.height, to:(b.height + (20*scale))},
\r
519 width:{from:b.width, to:(b.width + (20*scale))}
\r
520 }, duration, function(){
\r
535 * Creates a pause before any subsequent queued effects begin. If there are
\r
536 * no effects queued after the pause it will have no effect.
\r
541 * @param {Number} seconds The length of time to pause (in seconds)
\r
542 * @return {Ext.Element} The Element
\r
544 pause : function(seconds){
\r
545 var el = this.getFxEl();
\r
548 el.queueFx(o, function(){
\r
549 setTimeout(function(){
\r
551 }, seconds * 1000);
\r
557 * Fade an element in (from transparent to opaque). The ending opacity can be specified
\r
558 * using the "endOpacity" config option.
\r
561 // default: fade in from opacity 0 to 100%
\r
564 // custom: fade in from opacity 0 to 75% over 2 seconds
\r
565 el.fadeIn({ endOpacity: .75, duration: 2});
\r
567 // common config options shown with default values
\r
569 endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
\r
574 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
575 * @return {Ext.Element} The Element
\r
577 fadeIn : function(o){
\r
578 var el = this.getFxEl();
\r
580 el.queueFx(o, function(){
\r
581 this.setOpacity(0);
\r
583 this.dom.style.visibility = 'visible';
\r
584 var to = o.endOpacity || 1;
\r
585 arguments.callee.anim = this.fxanim({opacity:{to:to}},
\r
586 o, null, .5, "easeOut", function(){
\r
588 this.clearOpacity();
\r
597 * Fade an element out (from opaque to transparent). The ending opacity can be specified
\r
598 * using the "endOpacity" config option. Note that IE may require useDisplay:true in order
\r
599 * to redisplay correctly.
\r
602 // default: fade out from the element's current opacity to 0
\r
605 // custom: fade out from the element's current opacity to 25% over 2 seconds
\r
606 el.fadeOut({ endOpacity: .25, duration: 2});
\r
608 // common config options shown with default values
\r
610 endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
\r
617 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
618 * @return {Ext.Element} The Element
\r
620 fadeOut : function(o){
\r
621 var el = this.getFxEl();
\r
623 el.queueFx(o, function(){
\r
624 var to = o.endOpacity || 0;
\r
625 arguments.callee.anim = this.fxanim({opacity:{to:to}},
\r
626 o, null, .5, "easeOut", function(){
\r
628 if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){
\r
629 this.dom.style.display = "none";
\r
631 this.dom.style.visibility = "hidden";
\r
633 this.clearOpacity();
\r
642 * Animates the transition of an element's dimensions from a starting height/width
\r
643 * to an ending height/width.
\r
646 // change height and width to 100x100 pixels
\r
647 el.scale(100, 100);
\r
649 // common config options shown with default values. The height and width will default to
\r
650 // the element's existing values if passed as null.
\r
653 [element's height], {
\r
659 * @param {Number} width The new width (pass undefined to keep the original width)
\r
660 * @param {Number} height The new height (pass undefined to keep the original height)
\r
661 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
662 * @return {Ext.Element} The Element
\r
664 scale : function(w, h, o){
\r
665 this.shift(Ext.apply({}, o, {
\r
673 * Animates the transition of any combination of an element's dimensions, xy position and/or opacity.
\r
674 * Any of these properties not specified in the config object will not be changed. This effect
\r
675 * requires that at least one new dimension, position or opacity setting must be passed in on
\r
676 * the config object in order for the function to have any effect.
\r
679 // slide the element horizontally to x position 200 while changing the height and opacity
\r
680 el.shift({ x: 200, height: 50, opacity: .8 });
\r
682 // common config options shown with default values.
\r
684 width: [element's width],
\r
685 height: [element's height],
\r
686 x: [element's x position],
\r
687 y: [element's y position],
\r
688 opacity: [element's opacity],
\r
693 * @param {Object} options Object literal with any of the Fx config options
\r
694 * @return {Ext.Element} The Element
\r
696 shift : function(o){
\r
697 var el = this.getFxEl();
\r
699 el.queueFx(o, function(){
\r
700 var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity;
\r
701 if(w !== undefined){
\r
702 a.width = {to: this.adjustWidth(w)};
\r
704 if(h !== undefined){
\r
705 a.height = {to: this.adjustHeight(h)};
\r
707 if(o.left !== undefined){
\r
708 a.left = {to: o.left};
\r
710 if(o.top !== undefined){
\r
711 a.top = {to: o.top};
\r
713 if(o.right !== undefined){
\r
714 a.right = {to: o.right};
\r
716 if(o.bottom !== undefined){
\r
717 a.bottom = {to: o.bottom};
\r
719 if(x !== undefined || y !== undefined){
\r
721 x !== undefined ? x : this.getX(),
\r
722 y !== undefined ? y : this.getY()
\r
725 if(op !== undefined){
\r
726 a.opacity = {to: op};
\r
728 if(o.xy !== undefined){
\r
729 a.points = {to: o.xy};
\r
731 arguments.callee.anim = this.fxanim(a,
\r
732 o, 'motion', .35, "easeOut", function(){
\r
740 * Slides the element while fading it out of view. An anchor point can be optionally passed to set the
\r
741 * ending point of the effect.
\r
744 // default: slide the element downward while fading out
\r
747 // custom: slide the element out to the right with a 2-second duration
\r
748 el.ghost('r', { duration: 2 });
\r
750 // common config options shown with default values
\r
758 * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
\r
759 * @param {Object} options (optional) Object literal with any of the Fx config options
\r
760 * @return {Ext.Element} The Element
\r
762 ghost : function(anchor, o){
\r
763 var el = this.getFxEl();
\r
766 el.queueFx(o, function(){
\r
767 anchor = anchor || "b";
\r
769 // restore values after effect
\r
770 var r = this.getFxRestore();
\r
771 var w = this.getWidth(),
\r
772 h = this.getHeight();
\r
774 var st = this.dom.style;
\r
776 var after = function(){
\r
778 el.setDisplayed(false);
\r
784 el.setPositioning(r.pos);
\r
785 st.width = r.width;
\r
786 st.height = r.height;
\r
791 var a = {opacity: {to: 0}, points: {}}, pt = a.points;
\r
792 switch(anchor.toLowerCase()){
\r
819 arguments.callee.anim = this.fxanim(a,
\r
829 * Ensures that all effects queued after syncFx is called on the element are
\r
830 * run concurrently. This is the opposite of {@link #sequenceFx}.
\r
831 * @return {Ext.Element} The Element
\r
833 syncFx : function(){
\r
834 this.fxDefaults = Ext.apply(this.fxDefaults || {}, {
\r
843 * Ensures that all effects queued after sequenceFx is called on the element are
\r
844 * run in sequence. This is the opposite of {@link #syncFx}.
\r
845 * @return {Ext.Element} The Element
\r
847 sequenceFx : function(){
\r
848 this.fxDefaults = Ext.apply(this.fxDefaults || {}, {
\r
850 concurrent : false,
\r
857 nextFx : function(){
\r
858 var ef = this.fxQueue[0];
\r
865 * Returns true if the element has any effects actively running or queued, else returns false.
\r
866 * @return {Boolean} True if element has active effects, else false
\r
868 hasActiveFx : function(){
\r
869 return this.fxQueue && this.fxQueue[0];
\r
873 * Stops any running effects and clears the element's internal effects queue if it contains
\r
874 * any additional effects that haven't started yet.
\r
875 * @return {Ext.Element} The Element
\r
877 stopFx : function(){
\r
878 if(this.hasActiveFx()){
\r
879 var cur = this.fxQueue[0];
\r
880 if(cur && cur.anim && cur.anim.isAnimated()){
\r
881 this.fxQueue = [cur]; // clear out others
\r
882 cur.anim.stop(true);
\r
889 beforeFx : function(o){
\r
890 if(this.hasActiveFx() && !o.concurrent){
\r
901 * Returns true if the element is currently blocking so that no other effect can be queued
\r
902 * until this effect is finished, else returns false if blocking is not set. This is commonly
\r
903 * used to ensure that an effect initiated by a user action runs to completion prior to the
\r
904 * same effect being restarted (e.g., firing only one effect even if the user clicks several times).
\r
905 * @return {Boolean} True if blocking, else false
\r
907 hasFxBlock : function(){
\r
908 var q = this.fxQueue;
\r
909 return q && q[0] && q[0].block;
\r
913 queueFx : function(o, fn){
\r
917 if(!this.hasFxBlock()){
\r
918 Ext.applyIf(o, this.fxDefaults);
\r
920 var run = this.beforeFx(o);
\r
921 fn.block = o.block;
\r
922 this.fxQueue.push(fn);
\r
934 fxWrap : function(pos, o, vis){
\r
936 if(!o.wrap || !(wrap = Ext.get(o.wrap))){
\r
939 wrapXY = this.getXY();
\r
941 var div = document.createElement("div");
\r
942 div.style.visibility = vis;
\r
943 wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom));
\r
944 wrap.setPositioning(pos);
\r
945 if(wrap.getStyle("position") == "static"){
\r
946 wrap.position("relative");
\r
948 this.clearPositioning('auto');
\r
950 wrap.dom.appendChild(this.dom);
\r
952 wrap.setXY(wrapXY);
\r
959 fxUnwrap : function(wrap, pos, o){
\r
960 this.clearPositioning();
\r
961 this.setPositioning(pos);
\r
963 wrap.dom.parentNode.insertBefore(this.dom, wrap.dom);
\r
969 getFxRestore : function(){
\r
970 var st = this.dom.style;
\r
971 return {pos: this.getPositioning(), width: st.width, height : st.height};
\r
975 afterFx : function(o){
\r
977 this.applyStyles(o.afterStyle);
\r
980 this.addClass(o.afterCls);
\r
982 if(o.remove === true){
\r
985 Ext.callback(o.callback, o.scope, [this]);
\r
987 this.fxQueue.shift();
\r
993 getFxEl : function(){ // support for composite element fx
\r
994 return Ext.get(this.dom);
\r
998 fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
\r
999 animType = animType || 'run';
\r
1001 var anim = Ext.lib.Anim[animType](
\r
1003 (opt.duration || defaultDur) || .35,
\r
1004 (opt.easing || defaultEase) || 'easeOut',
\r
1006 Ext.callback(cb, this);
\r
1015 // backwords compat
\r
1016 Ext.Fx.resize = Ext.Fx.scale;
\r
1018 //When included, Ext.Fx is automatically applied to Element so that all basic
\r
1019 //effects are available directly via the Element API
\r
1020 Ext.apply(Ext.Element.prototype, Ext.Fx);
\r