-<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
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js">// Easing functions\r
-(function(){\r
- // shortcuts to aid compression\r
- var abs = Math.abs,\r
- pi = Math.PI,\r
- asin = Math.asin,\r
- pow = Math.pow,\r
- sin = Math.sin,\r
- EXTLIB = Ext.lib;\r
- \r
- Ext.apply(EXTLIB.Easing, {\r
- \r
- easeBoth: function (t, b, c, d) {\r
- return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -c / 2 * ((--t) * (t - 2) - 1) + b; \r
- },\r
- \r
- easeInStrong: function (t, b, c, d) {\r
- return c * (t /= d) * t * t * t + b;\r
- },\r
-\r
- easeOutStrong: function (t, b, c, d) {\r
- return -c * ((t = t / d - 1) * t * t * t - 1) + b;\r
- },\r
-\r
- easeBothStrong: function (t, b, c, d) {\r
- return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b;\r
- },\r
-\r
- elasticIn: function (t, b, c, d, a, p) {\r
- if (t == 0 || (t /= d) == 1) {\r
- return t == 0 ? b : b + c;\r
- } \r
- p = p || (d * .3); \r
-\r
- var s;\r
- if (a >= abs(c)) {\r
- s = p / (2 * pi) * asin(c / a);\r
- } else {\r
- a = c;\r
- s = p / 4;\r
- }\r
- \r
- return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b;\r
- \r
- }, \r
- \r
- elasticOut: function (t, b, c, d, a, p) {\r
- if (t == 0 || (t /= d) == 1) {\r
- return t == 0 ? b : b + c;\r
- } \r
- p = p || (d * .3); \r
-\r
- var s;\r
- if (a >= abs(c)) {\r
- s = p / (2 * pi) * asin(c / a);\r
- } else {\r
- a = c;\r
- s = p / 4;\r
- }\r
- \r
- return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b; \r
- }, \r
- \r
- elasticBoth: function (t, b, c, d, a, p) {\r
- if (t == 0 || (t /= d / 2) == 2) {\r
- return t == 0 ? b : b + c;\r
- } \r
- \r
- p = p || (d * (.3 * 1.5)); \r
-\r
- var s;\r
- if (a >= abs(c)) {\r
- s = p / (2 * pi) * asin(c / a);\r
- } else {\r
- a = c;\r
- s = p / 4;\r
- }\r
-\r
- return t < 1 ?\r
- -.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b :\r
- a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b;\r
- },\r
-\r
- backIn: function (t, b, c, d, s) {\r
- s = s || 1.70158; \r
- return c * (t /= d) * t * ((s + 1) * t - s) + b;\r
- },\r
-\r
-\r
- backOut: function (t, b, c, d, s) {\r
- if (!s) {\r
- s = 1.70158;\r
- }\r
- return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\r
- },\r
-\r
-\r
- backBoth: function (t, b, c, d, s) {\r
- s = s || 1.70158; \r
-\r
- return ((t /= d / 2 ) < 1) ?\r
- c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : \r
- c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;\r
- },\r
-\r
-\r
- bounceIn: function (t, b, c, d) {\r
- return c - EXTLIB.Easing.bounceOut(d - t, 0, c, d) + b;\r
- },\r
-\r
-\r
- bounceOut: function (t, b, c, d) {\r
- if ((t /= d) < (1 / 2.75)) {\r
- return c * (7.5625 * t * t) + b;\r
- } else if (t < (2 / 2.75)) {\r
- return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;\r
- } else if (t < (2.5 / 2.75)) {\r
- return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;\r
- }\r
- return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;\r
- },\r
-\r
-\r
- bounceBoth: function (t, b, c, d) {\r
- return (t < d / 2) ?\r
- EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : \r
- EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;\r
- }\r
- });\r
-})();\r
-\r
-(function() {\r
- var EXTLIB = Ext.lib;\r
- // Color Animation\r
- EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) {\r
- return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim);\r
- }\r
- \r
- EXTLIB.ColorAnim = function(el, attributes, duration, method) {\r
- EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);\r
- };\r
-\r
- Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase);\r
-\r
- var superclass = EXTLIB.ColorAnim.superclass,\r
- colorRE = /color$/i,\r
- transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/,\r
- rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,\r
- hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,\r
- hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,\r
- isset = function(v){\r
- return typeof v !== 'undefined';\r
- }\r
- \r
- // private \r
- function parseColor(s) { \r
- var pi = parseInt,\r
- base,\r
- out = null,\r
- c;\r
- \r
- if (s.length == 3) {\r
- return s;\r
- }\r
- \r
- Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){\r
- base = (idx % 2 == 0) ? 16 : 10;\r
- c = re.exec(s);\r
- if(c && c.length == 4){\r
- out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)];\r
- return false;\r
- }\r
- });\r
- return out;\r
- } \r
-\r
- Ext.apply(EXTLIB.ColorAnim.prototype, {\r
- getAttr : function(attr) {\r
- var me = this,\r
- el = me.el,\r
- val; \r
- if(colorRE.test(attr)){\r
- while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){\r
- el = el.parentNode;\r
- val = "fff";\r
- }\r
- }else{\r
- val = superclass.getAttr.call(me, attr);\r
- }\r
- return val;\r
- },\r
-\r
- doMethod : function(attr, start, end) {\r
- var me = this,\r
- val,\r
- floor = Math.floor,\r
- i, \r
- len,\r
- v; \r
-\r
- if(colorRE.test(attr)){\r
- val = [];\r
- \r
- for(i = 0, len = start.length; i < len; i++) {\r
- v = start[i];\r
- val[i] = superclass.doMethod.call(me, attr, v, end[i]);\r
- }\r
- val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')';\r
- }else{\r
- val = superclass.doMethod.call(me, attr, start, end);\r
- }\r
- return val;\r
- },\r
-\r
- setRunAttr : function(attr) {\r
- var me = this,\r
- a = me.attributes[attr],\r
- to = a.to,\r
- by = a.by,\r
- ra;\r
- \r
- superclass.setRunAttr.call(me, attr);\r
- ra = me.runAttrs[attr];\r
- if(colorRE.test(attr)){\r
- var start = parseColor(ra.start),\r
- end = parseColor(ra.end);\r
-\r
- if(!isset(to) && isset(by)){\r
- end = parseColor(by);\r
- for(var i=0,len=start.length; i<len; i++) {\r
- end[i] = start[i] + end[i];\r
- }\r
- }\r
- ra.start = start;\r
- ra.end = end;\r
- }\r
- }\r
- });\r
-})(); \r
-\r
- \r
-(function() {\r
- // Scroll Animation \r
- var EXTLIB = Ext.lib;\r
- EXTLIB.Anim.scroll = function(el, args, duration, easing, cb, scope) { \r
- return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.Scroll);\r
- }\r
- \r
- EXTLIB.Scroll = function(el, attributes, duration, method) {\r
- if(el){\r
- EXTLIB.Scroll.superclass.constructor.call(this, el, attributes, duration, method);\r
- }\r
- };\r
-\r
- Ext.extend(EXTLIB.Scroll, EXTLIB.ColorAnim);\r
-\r
- var superclass = EXTLIB.Scroll.superclass,\r
- SCROLL = 'scroll';\r
-\r
- Ext.apply(EXTLIB.Scroll.prototype, {\r
-\r
- doMethod : function(attr, start, end) {\r
- var val,\r
- me = this,\r
- curFrame = me.curFrame,\r
- totalFrames = me.totalFrames;\r
-\r
- if(attr == SCROLL){\r
- val = [me.method(curFrame, start[0], end[0] - start[0], totalFrames),\r
- me.method(curFrame, start[1], end[1] - start[1], totalFrames)];\r
- }else{\r
- val = superclass.doMethod.call(me, attr, start, end);\r
- }\r
- return val;\r
- },\r
-\r
- getAttr : function(attr) {\r
- var me = this;\r
-\r
- if (attr == SCROLL) {\r
- return [me.el.scrollLeft, me.el.scrollTop];\r
- }else{\r
- return superclass.getAttr.call(me, attr);\r
- }\r
- },\r
-\r
- setAttr : function(attr, val, unit) {\r
- var me = this;\r
-\r
- if(attr == SCROLL){\r
- me.el.scrollLeft = val[0];\r
- me.el.scrollTop = val[1];\r
- }else{\r
- superclass.setAttr.call(me, attr, val, unit);\r
- }\r
- }\r
- });\r
-})();</pre> \r
-</body>\r
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body onload="prettyPrint();">
+ <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
+ */
+// Easing functions
+(function(){
+ // shortcuts to aid compression
+ var abs = Math.abs,
+ pi = Math.PI,
+ asin = Math.asin,
+ pow = Math.pow,
+ sin = Math.sin,
+ EXTLIB = Ext.lib;
+
+ Ext.apply(EXTLIB.Easing, {
+
+ easeBoth: function (t, b, c, d) {
+ return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -c / 2 * ((--t) * (t - 2) - 1) + b;
+ },
+
+ easeInStrong: function (t, b, c, d) {
+ return c * (t /= d) * t * t * t + b;
+ },
+
+ easeOutStrong: function (t, b, c, d) {
+ return -c * ((t = t / d - 1) * t * t * t - 1) + b;
+ },
+
+ easeBothStrong: function (t, b, c, d) {
+ return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+ },
+
+ elasticIn: function (t, b, c, d, a, p) {
+ if (t == 0 || (t /= d) == 1) {
+ return t == 0 ? b : b + c;
+ }
+ p = p || (d * .3);
+
+ var s;
+ if (a >= abs(c)) {
+ s = p / (2 * pi) * asin(c / a);
+ } else {
+ a = c;
+ s = p / 4;
+ }
+
+ return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b;
+
+ },
+
+ elasticOut: function (t, b, c, d, a, p) {
+ if (t == 0 || (t /= d) == 1) {
+ return t == 0 ? b : b + c;
+ }
+ p = p || (d * .3);
+
+ var s;
+ if (a >= abs(c)) {
+ s = p / (2 * pi) * asin(c / a);
+ } else {
+ a = c;
+ s = p / 4;
+ }
+
+ return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b;
+ },
+
+ elasticBoth: function (t, b, c, d, a, p) {
+ if (t == 0 || (t /= d / 2) == 2) {
+ return t == 0 ? b : b + c;
+ }
+
+ p = p || (d * (.3 * 1.5));
+
+ var s;
+ if (a >= abs(c)) {
+ s = p / (2 * pi) * asin(c / a);
+ } else {
+ a = c;
+ s = p / 4;
+ }
+
+ return t < 1 ?
+ -.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b :
+ a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b;
+ },
+
+ backIn: function (t, b, c, d, s) {
+ s = s || 1.70158;
+ return c * (t /= d) * t * ((s + 1) * t - s) + b;
+ },
+
+
+ backOut: function (t, b, c, d, s) {
+ if (!s) {
+ s = 1.70158;
+ }
+ return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
+ },
+
+
+ backBoth: function (t, b, c, d, s) {
+ s = s || 1.70158;
+
+ return ((t /= d / 2 ) < 1) ?
+ c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b :
+ c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
+ },
+
+
+ bounceIn: function (t, b, c, d) {
+ return c - EXTLIB.Easing.bounceOut(d - t, 0, c, d) + b;
+ },
+
+
+ bounceOut: function (t, b, c, d) {
+ if ((t /= d) < (1 / 2.75)) {
+ return c * (7.5625 * t * t) + b;
+ } else if (t < (2 / 2.75)) {
+ return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
+ } else if (t < (2.5 / 2.75)) {
+ return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
+ }
+ return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
+ },
+
+
+ bounceBoth: function (t, b, c, d) {
+ return (t < d / 2) ?
+ EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b :
+ EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b;
+ }
+ });
+})();
+
+(function() {
+ var EXTLIB = Ext.lib;
+ // Color Animation
+ EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) {
+ return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim);
+ };
+
+ EXTLIB.ColorAnim = function(el, attributes, duration, method) {
+ EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method);
+ };
+
+ Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase);
+
+ var superclass = EXTLIB.ColorAnim.superclass,
+ colorRE = /color$/i,
+ transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/,
+ rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,
+ hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,
+ hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,
+ isset = function(v){
+ return typeof v !== 'undefined';
+ };
+
+ // private
+ function parseColor(s) {
+ var pi = parseInt,
+ base,
+ out = null,
+ c;
+
+ if (s.length == 3) {
+ return s;
+ }
+
+ Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){
+ base = (idx % 2 == 0) ? 16 : 10;
+ c = re.exec(s);
+ if(c && c.length == 4){
+ out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)];
+ return false;
+ }
+ });
+ return out;
+ }
+
+ Ext.apply(EXTLIB.ColorAnim.prototype, {
+ getAttr : function(attr) {
+ var me = this,
+ el = me.el,
+ val;
+ if(colorRE.test(attr)){
+ while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){
+ el = el.parentNode;
+ val = "fff";
+ }
+ }else{
+ val = superclass.getAttr.call(me, attr);
+ }
+ return val;
+ },
+
+ doMethod : function(attr, start, end) {
+ var me = this,
+ val,
+ floor = Math.floor,
+ i,
+ len,
+ v;
+
+ if(colorRE.test(attr)){
+ val = [];
+ end = end || [];
+
+ for(i = 0, len = start.length; i < len; i++) {
+ v = start[i];
+ val[i] = superclass.doMethod.call(me, attr, v, end[i]);
+ }
+ val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')';
+ }else{
+ val = superclass.doMethod.call(me, attr, start, end);
+ }
+ return val;
+ },
+
+ setRunAttr : function(attr) {
+ var me = this,
+ a = me.attributes[attr],
+ to = a.to,
+ by = a.by,
+ ra;
+
+ superclass.setRunAttr.call(me, attr);
+ ra = me.runAttrs[attr];
+ if(colorRE.test(attr)){
+ var start = parseColor(ra.start),
+ end = parseColor(ra.end);
+
+ if(!isset(to) && isset(by)){
+ end = parseColor(by);
+ for(var i=0,len=start.length; i<len; i++) {
+ end[i] = start[i] + end[i];
+ }
+ }
+ ra.start = start;
+ ra.end = end;
+ }
+ }
+ });
+})();
+
+
+(function() {
+ // Scroll Animation
+ var EXTLIB = Ext.lib;
+ EXTLIB.Anim.scroll = function(el, args, duration, easing, cb, scope) {
+ return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.Scroll);
+ };
+
+ EXTLIB.Scroll = function(el, attributes, duration, method) {
+ if(el){
+ EXTLIB.Scroll.superclass.constructor.call(this, el, attributes, duration, method);
+ }
+ };
+
+ Ext.extend(EXTLIB.Scroll, EXTLIB.ColorAnim);
+
+ var superclass = EXTLIB.Scroll.superclass,
+ SCROLL = 'scroll';
+
+ Ext.apply(EXTLIB.Scroll.prototype, {
+
+ doMethod : function(attr, start, end) {
+ var val,
+ me = this,
+ curFrame = me.curFrame,
+ totalFrames = me.totalFrames;
+
+ if(attr == SCROLL){
+ val = [me.method(curFrame, start[0], end[0] - start[0], totalFrames),
+ me.method(curFrame, start[1], end[1] - start[1], totalFrames)];
+ }else{
+ val = superclass.doMethod.call(me, attr, start, end);
+ }
+ return val;
+ },
+
+ getAttr : function(attr) {
+ var me = this;
+
+ if (attr == SCROLL) {
+ return [me.el.scrollLeft, me.el.scrollTop];
+ }else{
+ return superclass.getAttr.call(me, attr);
+ }
+ },
+
+ setAttr : function(attr, val, unit) {
+ var me = this;
+
+ if(attr == SCROLL){
+ me.el.scrollLeft = val[0];
+ me.el.scrollTop = val[1];
+ }else{
+ superclass.setAttr.call(me, attr, val, unit);
+ }
+ }
+ });
+})();</pre>
+</body>