-<html>
-<head>
- <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.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-// 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
-\r
- if(colorRE.test(attr)){\r
- val = [];\r
- \r
- Ext.each(start, function(v, i) {\r
- val[i] = superclass.doMethod.call(me, attr, v, end[i]);\r
- });\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
- Ext.each(start, function(item, i){\r
- end[i] = item + 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>
-</body>
-</html>
\ No newline at end of file