Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from ericf/attr-opts

Merge Attribute options changes with the current `master`
  • Loading branch information...
commit b5c9a4ca002bfe6a03b15c24ba2c83e2f96357d9 2 parents 3fa051e + f79b737
@Satyam Satyam authored
Showing with 6,843 additions and 6,334 deletions.
  1. +0 −4 .travis.yml
  2. +1 −1  LICENSE.md
  3. +142 −127 build/anim-easing/anim-easing-coverage.js
  4. +48 −33 build/anim-easing/anim-easing-debug.js
  5. +48 −33 build/anim-easing/anim-easing.js
  6. +2 −2 build/anim-scroll/anim-scroll-coverage.js
  7. +1 −1  build/anim-scroll/anim-scroll-debug.js
  8. +1 −1  build/anim-scroll/anim-scroll.js
  9. +2 −2 build/anim-xy/anim-xy-coverage.js
  10. +1 −1  build/anim-xy/anim-xy-debug.js
  11. +1 −1  build/anim-xy/anim-xy.js
  12. +7 −6 build/app-content/app-content-coverage.js
  13. +2 −1  build/app-content/app-content-debug.js
  14. +1 −1  build/app-content/app-content-min.js
  15. +2 −1  build/app-content/app-content.js
  16. +50 −45 build/attribute-base/attribute-base-coverage.js
  17. +34 −28 build/attribute-base/attribute-base-debug.js
  18. +1 −1  build/attribute-base/attribute-base-min.js
  19. +34 −28 build/attribute-base/attribute-base.js
  20. +19 −132 build/attribute-complex/attribute-complex-coverage.js
  21. +12 −89 build/attribute-complex/attribute-complex-debug.js
  22. +1 −1  build/attribute-complex/attribute-complex-min.js
  23. +12 −89 build/attribute-complex/attribute-complex.js
  24. +347 −254 build/attribute-core/attribute-core-coverage.js
  25. +125 −54 build/attribute-core/attribute-core-debug.js
  26. +1 −1  build/attribute-core/attribute-core-min.js
  27. +125 −53 build/attribute-core/attribute-core.js
  28. +0 −269 build/attribute-events/attribute-events-coverage.js
  29. +0 −1  build/attribute-events/attribute-events-min.js
  30. +48 −46 build/attribute-extras/attribute-extras-coverage.js
  31. +10 −8 build/attribute-extras/attribute-extras-debug.js
  32. +10 −8 build/attribute-extras/attribute-extras.js
  33. +286 −0 build/attribute-observable/attribute-observable-coverage.js
  34. +25 −9 build/{attribute-events/attribute-events-debug.js → attribute-observable/attribute-observable-debug.js}
  35. +1 −0  build/attribute-observable/attribute-observable-min.js
  36. +25 −9 build/{attribute-events/attribute-events.js → attribute-observable/attribute-observable.js}
  37. +13 −2 build/autocomplete-base/autocomplete-base-coverage.js
  38. +12 −1 build/autocomplete-base/autocomplete-base-debug.js
  39. +12 −1 build/autocomplete-base/autocomplete-base.js
  40. +182 −174 build/autocomplete-list/autocomplete-list-coverage.js
  41. +16 −7 build/autocomplete-list/autocomplete-list-debug.js
  42. +1 −1  build/autocomplete-list/autocomplete-list-min.js
  43. +16 −7 build/autocomplete-list/autocomplete-list.js
  44. +61 −297 build/base-base/base-base-coverage.js
  45. +41 −244 build/base-base/base-base-debug.js
  46. +1 −1  build/base-base/base-base-min.js
  47. +41 −242 build/base-base/base-base.js
  48. +248 −203 build/base-build/base-build-coverage.js
  49. +102 −67 build/base-build/base-build-debug.js
  50. +1 −1  build/base-build/base-build-min.js
  51. +102 −67 build/base-build/base-build.js
  52. +243 −212 build/base-core/base-core-coverage.js
  53. +92 −68 build/base-core/base-core-debug.js
  54. +1 −1  build/base-core/base-core-min.js
  55. +91 −68 build/base-core/base-core.js
  56. +277 −0 build/base-observable/base-observable-coverage.js
  57. +203 −0 build/base-observable/base-observable-debug.js
  58. +1 −0  build/base-observable/base-observable-min.js
  59. +202 −0 build/base-observable/base-observable.js
  60. +4 −4 build/base-pluginhost/base-pluginhost-coverage.js
  61. +3 −3 build/base-pluginhost/base-pluginhost-debug.js
  62. +3 −3 build/base-pluginhost/base-pluginhost.js
  63. +1,270 −1,227 build/calendar-base/calendar-base-coverage.js
  64. +1,089 −1,046 build/calendar-base/calendar-base-debug.js
  65. +1 −1  build/calendar-base/calendar-base-min.js
  66. +1,089 −1,046 build/calendar-base/calendar-base.js
Sorry, we could not display the entire diff because too many files (516) changed.
View
4 .travis.yml
@@ -15,7 +15,3 @@ install:
- ./src/common/travis/install.sh
script:
- ./src/common/travis/test.sh
-notifications:
- email:
- - davglass@gmail.com
- - davglass@yahoo-inc.com
View
2  LICENSE.md
@@ -1,7 +1,7 @@
Software License Agreement (BSD License)
========================================
-Copyright (c) 2012, Yahoo! Inc. All rights reserved.
+Copyright (c) 2013, Yahoo! Inc. All rights reserved.
----------------------------------------------------
Redistribution and use of this software in source and binary forms, with or
View
269 build/anim-easing/anim-easing-coverage.js
@@ -26,9 +26,9 @@ _yuitest_coverage["build/anim-easing/anim-easing.js"] = {
path: "build/anim-easing/anim-easing.js",
code: []
};
-_yuitest_coverage["build/anim-easing/anim-easing.js"].code=["YUI.add('anim-easing', function (Y, NAME) {","","/*","TERMS OF USE - EASING EQUATIONS","Open source under the BSD License.","Copyright 2001 Robert Penner All rights reserved.","","Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:",""," * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."," * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."," * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.","","THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","*/","","/**"," * The easing module provides methods for customizing"," * how an animation behaves during each run."," * @class Easing"," * @module anim"," * @submodule anim-easing"," */","","var Easing = {",""," /**"," * Uniform speed between points."," * @for Easing"," * @method easeNone"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeNone: function (t, b, c, d) {"," return c*t/d + b;"," },"," "," /**"," * Begins slowly and accelerates towards end. (quadratic)"," * @method easeIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeIn: function (t, b, c, d) {"," return c*(t/=d)*t + b;"," },",""," /**"," * Begins quickly and decelerates towards end. (quadratic)"," * @method easeOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeOut: function (t, b, c, d) {"," return -c *(t/=d)*(t-2) + b;"," },"," "," /**"," * Begins slowly and decelerates towards end. (quadratic)"," * @method easeBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeBoth: function (t, b, c, d) {"," if ((t/=d/2) < 1) {"," return c/2*t*t + b;"," }"," "," return -c/2 * ((--t)*(t-2) - 1) + b;"," },"," "," /**"," * Begins slowly and accelerates towards end. (quartic)"," * @method easeInStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeInStrong: function (t, b, c, d) {"," return c*(t/=d)*t*t*t + b;"," },"," "," /**"," * Begins quickly and decelerates towards end. (quartic)"," * @method easeOutStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeOutStrong: function (t, b, c, d) {"," return -c * ((t=t/d-1)*t*t*t - 1) + b;"," },"," "," /**"," * Begins slowly and decelerates towards end. (quartic)"," * @method easeBothStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeBothStrong: function (t, b, c, d) {"," if ((t/=d/2) < 1) {"," return c/2*t*t*t*t + b;"," }"," "," return -c/2 * ((t-=2)*t*t*t - 2) + b;"," },",""," /**"," * Snap in elastic effect."," * @method elasticIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */",""," elasticIn: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }"," if ( (t /= d) === 1 ) {"," return b+c;"," }"," if (!p) {"," p = d* 0.3;"," }"," "," if (!a || a < Math.abs(c)) {"," a = c; "," s = p/4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }"," "," return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;"," },",""," /**"," * Snap out elastic effect."," * @method elasticOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */"," elasticOut: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }"," if ( (t /= d) === 1 ) {"," return b+c;"," }"," if (!p) {"," p=d * 0.3;"," }"," "," if (!a || a < Math.abs(c)) {"," a = c;"," s = p / 4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }"," "," return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;"," },"," "," /**"," * Snap both elastic effect."," * @method elasticBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */"," elasticBoth: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }"," "," if ( (t /= d/2) === 2 ) {"," return b+c;"," }"," "," if (!p) {"," p = d*(0.3*1.5);"," }"," "," if ( !a || a < Math.abs(c) ) {"," a = c; "," s = p/4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }"," "," if (t < 1) {"," return -0.5*(a*Math.pow(2,10*(t-=1)) * "," Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;"," }"," return a*Math.pow(2,-10*(t-=1)) * "," Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;"," },","",""," /**"," * Backtracks slightly, then reverses direction and moves to end."," * @method backIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backIn: function (t, b, c, d, s) {"," if (s === undefined) {"," s = 1.70158;"," }"," if (t === d) {"," t -= 0.001;"," }"," return c*(t/=d)*t*((s+1)*t - s) + b;"," },",""," /**"," * Overshoots end, then reverses and comes back to end."," * @method backOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backOut: function (t, b, c, d, s) {"," if (typeof s === 'undefined') {"," s = 1.70158;"," }"," return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;"," },"," "," /**"," * Backtracks slightly, then reverses direction, overshoots end, "," * then reverses and comes back to end."," * @method backBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backBoth: function (t, b, c, d, s) {"," if (typeof s === 'undefined') {"," s = 1.70158; "," }"," "," if ((t /= d/2 ) < 1) {"," return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;"," }"," return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;"," },",""," /**"," * Bounce off of start."," * @method bounceIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," bounceIn: function (t, b, c, d) {"," return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;"," },"," "," /**"," * Bounces off end."," * @method bounceOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," 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 + 0.75) + b;"," } else if (t < (2.5/2.75)) {"," return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;"," }"," return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;"," },"," "," /**"," * Bounces off start and end."," * @method bounceBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," bounceBoth: function (t, b, c, d) {"," if (t < d/2) {"," return Y.Easing.bounceIn(t * 2, 0, c, d) * 0.5 + b;"," }"," return Y.Easing.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;"," }","};","","Y.Easing = Easing;","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
-_yuitest_coverage["build/anim-easing/anim-easing.js"].lines = {"1":0,"25":0,"38":0,"51":0,"64":0,"77":0,"78":0,"81":0,"94":0,"107":0,"120":0,"121":0,"124":0,"140":0,"141":0,"142":0,"144":0,"145":0,"147":0,"148":0,"151":0,"152":0,"153":0,"156":0,"159":0,"174":0,"175":0,"176":0,"178":0,"179":0,"181":0,"182":0,"185":0,"186":0,"187":0,"190":0,"193":0,"208":0,"209":0,"210":0,"213":0,"214":0,"217":0,"218":0,"221":0,"222":0,"223":0,"226":0,"229":0,"230":0,"233":0,"249":0,"250":0,"252":0,"253":0,"255":0,"269":0,"270":0,"272":0,"287":0,"288":0,"291":0,"292":0,"294":0,"307":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"327":0,"340":0,"341":0,"343":0,"347":0};
-_yuitest_coverage["build/anim-easing/anim-easing.js"].functions = {"easeNone:37":0,"easeIn:50":0,"easeOut:63":0,"easeBoth:76":0,"easeInStrong:93":0,"easeOutStrong:106":0,"easeBothStrong:119":0,"elasticIn:139":0,"elasticOut:173":0,"elasticBoth:207":0,"backIn:248":0,"backOut:268":0,"backBoth:286":0,"bounceIn:306":0,"bounceOut:319":0,"bounceBoth:339":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/anim-easing/anim-easing.js"].code=["YUI.add('anim-easing', function (Y, NAME) {","","/*","TERMS OF USE - EASING EQUATIONS","Open source under the BSD License.","Copyright 2001 Robert Penner All rights reserved.","","Redistribution and use in source and binary forms, with or without modification,","are permitted provided that the following conditions are met:",""," * Redistributions of source code must retain the above copyright notice, this"," list of conditions and the following disclaimer."," * Redistributions in binary form must reproduce the above copyright notice,"," this list of conditions and the following disclaimer in the documentation"," and/or other materials provided with the distribution."," * Neither the name of the author nor the names of contributors may be used to"," endorse or promote products derived from this software without specific prior"," written permission.","","THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND","ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED","WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.","IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,","INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,","BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,","DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY","OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE","OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED","OF THE POSSIBILITY OF SUCH DAMAGE.","*/","","/**"," * The easing module provides methods for customizing"," * how an animation behaves during each run."," * @class Easing"," * @module anim"," * @submodule anim-easing"," */","","var Easing = {",""," /**"," * Uniform speed between points."," * @for Easing"," * @method easeNone"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeNone: function (t, b, c, d) {"," return c*t/d + b;"," },",""," /**"," * Begins slowly and accelerates towards end. (quadratic)"," * @method easeIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeIn: function (t, b, c, d) {"," return c*(t/=d)*t + b;"," },",""," /**"," * Begins quickly and decelerates towards end. (quadratic)"," * @method easeOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeOut: function (t, b, c, d) {"," return -c *(t/=d)*(t-2) + b;"," },",""," /**"," * Begins slowly and decelerates towards end. (quadratic)"," * @method easeBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeBoth: function (t, b, c, d) {"," if ((t /= d/2) < 1) {"," return c/2*t*t + b;"," }",""," return -c/2 * ((--t)*(t-2) - 1) + b;"," },",""," /**"," * Begins slowly and accelerates towards end. (quartic)"," * @method easeInStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeInStrong: function (t, b, c, d) {"," return c*(t/=d)*t*t*t + b;"," },",""," /**"," * Begins quickly and decelerates towards end. (quartic)"," * @method easeOutStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeOutStrong: function (t, b, c, d) {"," return -c * ((t=t/d-1)*t*t*t - 1) + b;"," },",""," /**"," * Begins slowly and decelerates towards end. (quartic)"," * @method easeBothStrong"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," easeBothStrong: function (t, b, c, d) {"," if ((t /= d/2) < 1) {"," return c/2*t*t*t*t + b;"," }",""," return -c/2 * ((t-=2)*t*t*t - 2) + b;"," },",""," /**"," * Snap in elastic effect."," * @method elasticIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */",""," elasticIn: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }"," if ( (t /= d) === 1 ) {"," return b+c;"," }"," if (!p) {"," p = d* 0.3;"," }",""," if (!a || a < Math.abs(c)) {"," a = c;"," s = p/4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }",""," return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;"," },",""," /**"," * Snap out elastic effect."," * @method elasticOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */"," elasticOut: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }"," if ( (t /= d) === 1 ) {"," return b+c;"," }"," if (!p) {"," p=d * 0.3;"," }",""," if (!a || a < Math.abs(c)) {"," a = c;"," s = p / 4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }",""," return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;"," },",""," /**"," * Snap both elastic effect."," * @method elasticBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} a Amplitude (optional)"," * @param {Number} p Period (optional)"," * @return {Number} The computed value for the current animation frame"," */"," elasticBoth: function (t, b, c, d, a, p) {"," var s;"," if (t === 0) {"," return b;"," }",""," if ( (t /= d/2) === 2 ) {"," return b+c;"," }",""," if (!p) {"," p = d*(0.3*1.5);"," }",""," if ( !a || a < Math.abs(c) ) {"," a = c;"," s = p/4;"," }"," else {"," s = p/(2*Math.PI) * Math.asin (c/a);"," }",""," if (t < 1) {"," return -0.5*(a*Math.pow(2,10*(t-=1)) *"," Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;"," }"," return a*Math.pow(2,-10*(t-=1)) *"," Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;"," },","",""," /**"," * Backtracks slightly, then reverses direction and moves to end."," * @method backIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backIn: function (t, b, c, d, s) {"," if (s === undefined) {"," s = 1.70158;"," }"," if (t === d) {"," t -= 0.001;"," }"," return c*(t/=d)*t*((s+1)*t - s) + b;"," },",""," /**"," * Overshoots end, then reverses and comes back to end."," * @method backOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backOut: function (t, b, c, d, s) {"," if (typeof s === 'undefined') {"," s = 1.70158;"," }"," return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;"," },",""," /**"," * Backtracks slightly, then reverses direction, overshoots end,"," * then reverses and comes back to end."," * @method backBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @param {Number} s Overshoot (optional)"," * @return {Number} The computed value for the current animation frame"," */"," backBoth: function (t, b, c, d, s) {"," if (typeof s === 'undefined') {"," s = 1.70158;"," }",""," if ((t /= d/2 ) < 1) {"," return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;"," }"," return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;"," },",""," /**"," * Bounce off of start."," * @method bounceIn"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," bounceIn: function (t, b, c, d) {"," return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;"," },",""," /**"," * Bounces off end."," * @method bounceOut"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," 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 + 0.75) + b;"," } else if (t < (2.5/2.75)) {"," return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;"," }"," return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;"," },",""," /**"," * Bounces off start and end."," * @method bounceBoth"," * @param {Number} t Time value used to compute current value"," * @param {Number} b Starting value"," * @param {Number} c Delta between start and end values"," * @param {Number} d Total length of animation"," * @return {Number} The computed value for the current animation frame"," */"," bounceBoth: function (t, b, c, d) {"," if (t < d/2) {"," return Y.Easing.bounceIn(t * 2, 0, c, d) * 0.5 + b;"," }"," return Y.Easing.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;"," }","};","","Y.Easing = Easing;","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
+_yuitest_coverage["build/anim-easing/anim-easing.js"].lines = {"1":0,"40":0,"53":0,"66":0,"79":0,"92":0,"93":0,"96":0,"109":0,"122":0,"135":0,"136":0,"139":0,"155":0,"156":0,"157":0,"159":0,"160":0,"162":0,"163":0,"166":0,"167":0,"168":0,"171":0,"174":0,"189":0,"190":0,"191":0,"193":0,"194":0,"196":0,"197":0,"200":0,"201":0,"202":0,"205":0,"208":0,"223":0,"224":0,"225":0,"228":0,"229":0,"232":0,"233":0,"236":0,"237":0,"238":0,"241":0,"244":0,"245":0,"248":0,"264":0,"265":0,"267":0,"268":0,"270":0,"284":0,"285":0,"287":0,"302":0,"303":0,"306":0,"307":0,"309":0,"322":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"342":0,"355":0,"356":0,"358":0,"362":0};
+_yuitest_coverage["build/anim-easing/anim-easing.js"].functions = {"easeNone:52":0,"easeIn:65":0,"easeOut:78":0,"easeBoth:91":0,"easeInStrong:108":0,"easeOutStrong:121":0,"easeBothStrong:134":0,"elasticIn:154":0,"elasticOut:188":0,"elasticBoth:222":0,"backIn:263":0,"backOut:283":0,"backBoth:301":0,"bounceIn:321":0,"bounceOut:334":0,"bounceBoth:354":0,"(anonymous 1):1":0};
_yuitest_coverage["build/anim-easing/anim-easing.js"].coveredLines = 76;
_yuitest_coverage["build/anim-easing/anim-easing.js"].coveredFunctions = 17;
_yuitest_coverline("build/anim-easing/anim-easing.js", 1);
@@ -39,13 +39,28 @@ TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to
+ endorse or promote products derived from this software without specific prior
+ written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
@@ -57,7 +72,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*/
_yuitest_coverfunc("build/anim-easing/anim-easing.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 25);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 40);
var Easing = {
/**
@@ -71,11 +86,11 @@ var Easing = {
* @return {Number} The computed value for the current animation frame
*/
easeNone: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeNone", 37);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 38);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeNone", 52);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 53);
return c*t/d + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quadratic)
* @method easeIn
@@ -86,8 +101,8 @@ return c*t/d + b;
* @return {Number} The computed value for the current animation frame
*/
easeIn: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeIn", 50);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 51);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeIn", 65);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 66);
return c*(t/=d)*t + b;
},
@@ -101,11 +116,11 @@ return c*(t/=d)*t + b;
* @return {Number} The computed value for the current animation frame
*/
easeOut: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeOut", 63);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 64);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeOut", 78);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 79);
return -c *(t/=d)*(t-2) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quadratic)
* @method easeBoth
@@ -116,17 +131,17 @@ return -c *(t/=d)*(t-2) + b;
* @return {Number} The computed value for the current animation frame
*/
easeBoth: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeBoth", 76);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 77);
-if ((t/=d/2) < 1) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 78);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeBoth", 91);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 92);
+if ((t /= d/2) < 1) {
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 93);
return c/2*t*t + b;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 81);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 96);
return -c/2 * ((--t)*(t-2) - 1) + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quartic)
* @method easeInStrong
@@ -137,11 +152,11 @@ return -c/2 * ((--t)*(t-2) - 1) + b;
* @return {Number} The computed value for the current animation frame
*/
easeInStrong: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeInStrong", 93);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 94);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeInStrong", 108);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 109);
return c*(t/=d)*t*t*t + b;
},
-
+
/**
* Begins quickly and decelerates towards end. (quartic)
* @method easeOutStrong
@@ -152,11 +167,11 @@ return c*(t/=d)*t*t*t + b;
* @return {Number} The computed value for the current animation frame
*/
easeOutStrong: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeOutStrong", 106);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 107);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeOutStrong", 121);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 122);
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quartic)
* @method easeBothStrong
@@ -167,14 +182,14 @@ return -c * ((t=t/d-1)*t*t*t - 1) + b;
* @return {Number} The computed value for the current animation frame
*/
easeBothStrong: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeBothStrong", 119);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 120);
-if ((t/=d/2) < 1) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 121);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "easeBothStrong", 134);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 135);
+if ((t /= d/2) < 1) {
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 136);
return c/2*t*t*t*t + b;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 124);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 139);
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
@@ -191,38 +206,38 @@ return -c/2 * ((t-=2)*t*t*t - 2) + b;
*/
elasticIn: function (t, b, c, d, a, p) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticIn", 139);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 140);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticIn", 154);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 155);
var s;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 141);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 156);
if (t === 0) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 142);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 157);
return b;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 144);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 159);
if ( (t /= d) === 1 ) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 145);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 160);
return b+c;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 147);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 162);
if (!p) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 148);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 163);
p = d* 0.3;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 151);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 166);
if (!a || a < Math.abs(c)) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 152);
-a = c;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 153);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 167);
+a = c;
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 168);
s = p/4;
}
else {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 156);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 171);
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 159);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 174);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
@@ -238,41 +253,41 @@ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
* @return {Number} The computed value for the current animation frame
*/
elasticOut: function (t, b, c, d, a, p) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticOut", 173);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 174);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticOut", 188);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 189);
var s;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 175);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 190);
if (t === 0) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 176);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 191);
return b;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 178);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 193);
if ( (t /= d) === 1 ) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 179);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 194);
return b+c;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 181);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 196);
if (!p) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 182);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 197);
p=d * 0.3;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 185);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 200);
if (!a || a < Math.abs(c)) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 186);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 201);
a = c;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 187);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 202);
s = p / 4;
}
else {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 190);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 205);
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 193);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 208);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
-
+
/**
* Snap both elastic effect.
* @method elasticBoth
@@ -285,47 +300,47 @@ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
* @return {Number} The computed value for the current animation frame
*/
elasticBoth: function (t, b, c, d, a, p) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticBoth", 207);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 208);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "elasticBoth", 222);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 223);
var s;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 209);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 224);
if (t === 0) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 210);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 225);
return b;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 213);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 228);
if ( (t /= d/2) === 2 ) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 214);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 229);
return b+c;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 217);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 232);
if (!p) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 218);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 233);
p = d*(0.3*1.5);
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 221);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 236);
if ( !a || a < Math.abs(c) ) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 222);
-a = c;
- _yuitest_coverline("build/anim-easing/anim-easing.js", 223);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 237);
+a = c;
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 238);
s = p/4;
}
else {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 226);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 241);
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 229);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 244);
if (t < 1) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 230);
-return -0.5*(a*Math.pow(2,10*(t-=1)) *
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 245);
+return -0.5*(a*Math.pow(2,10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 233);
-return a*Math.pow(2,-10*(t-=1)) *
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 248);
+return a*Math.pow(2,-10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;
},
@@ -341,18 +356,18 @@ return a*Math.pow(2,-10*(t-=1)) *
* @return {Number} The computed value for the current animation frame
*/
backIn: function (t, b, c, d, s) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backIn", 248);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 249);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backIn", 263);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 264);
if (s === undefined) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 250);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 265);
s = 1.70158;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 252);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 267);
if (t === d) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 253);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 268);
t -= 0.001;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 255);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 270);
return c*(t/=d)*t*((s+1)*t - s) + b;
},
@@ -367,18 +382,18 @@ return c*(t/=d)*t*((s+1)*t - s) + b;
* @return {Number} The computed value for the current animation frame
*/
backOut: function (t, b, c, d, s) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backOut", 268);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 269);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backOut", 283);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 284);
if (typeof s === 'undefined') {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 270);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 285);
s = 1.70158;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 272);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 287);
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
-
+
/**
- * Backtracks slightly, then reverses direction, overshoots end,
+ * Backtracks slightly, then reverses direction, overshoots end,
* then reverses and comes back to end.
* @method backBoth
* @param {Number} t Time value used to compute current value
@@ -389,19 +404,19 @@ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
* @return {Number} The computed value for the current animation frame
*/
backBoth: function (t, b, c, d, s) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backBoth", 286);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 287);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "backBoth", 301);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 302);
if (typeof s === 'undefined') {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 288);
-s = 1.70158;
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 303);
+s = 1.70158;
}
-
- _yuitest_coverline("build/anim-easing/anim-easing.js", 291);
+
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 306);
if ((t /= d/2 ) < 1) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 292);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 307);
return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 294);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 309);
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
@@ -415,11 +430,11 @@ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
* @return {Number} The computed value for the current animation frame
*/
bounceIn: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceIn", 306);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 307);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceIn", 321);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 322);
return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;
},
-
+
/**
* Bounces off end.
* @method bounceOut
@@ -430,24 +445,24 @@ return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;
* @return {Number} The computed value for the current animation frame
*/
bounceOut: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceOut", 319);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 320);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceOut", 334);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 335);
if ((t/=d) < (1/2.75)) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 321);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 336);
return c*(7.5625*t*t) + b;
- } else {_yuitest_coverline("build/anim-easing/anim-easing.js", 322);
+ } else {_yuitest_coverline("build/anim-easing/anim-easing.js", 337);
if (t < (2/2.75)) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 323);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 338);
return c*(7.5625*(t-=(1.5/2.75))*t + 0.75) + b;
- } else {_yuitest_coverline("build/anim-easing/anim-easing.js", 324);
+ } else {_yuitest_coverline("build/anim-easing/anim-easing.js", 339);
if (t < (2.5/2.75)) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 325);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 340);
return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;
}}}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 327);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 342);
return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;
},
-
+
/**
* Bounces off start and end.
* @method bounceBoth
@@ -458,18 +473,18 @@ return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;
* @return {Number} The computed value for the current animation frame
*/
bounceBoth: function (t, b, c, d) {
- _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceBoth", 339);
-_yuitest_coverline("build/anim-easing/anim-easing.js", 340);
+ _yuitest_coverfunc("build/anim-easing/anim-easing.js", "bounceBoth", 354);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 355);
if (t < d/2) {
- _yuitest_coverline("build/anim-easing/anim-easing.js", 341);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 356);
return Y.Easing.bounceIn(t * 2, 0, c, d) * 0.5 + b;
}
- _yuitest_coverline("build/anim-easing/anim-easing.js", 343);
+ _yuitest_coverline("build/anim-easing/anim-easing.js", 358);
return Y.Easing.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
}
};
-_yuitest_coverline("build/anim-easing/anim-easing.js", 347);
+_yuitest_coverline("build/anim-easing/anim-easing.js", 362);
Y.Easing = Easing;
View
81 build/anim-easing/anim-easing-debug.js
@@ -5,13 +5,28 @@ TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to
+ endorse or promote products derived from this software without specific prior
+ written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
@@ -37,7 +52,7 @@ var Easing = {
easeNone: function (t, b, c, d) {
return c*t/d + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quadratic)
* @method easeIn
@@ -63,7 +78,7 @@ var Easing = {
easeOut: function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quadratic)
* @method easeBoth
@@ -74,13 +89,13 @@ var Easing = {
* @return {Number} The computed value for the current animation frame
*/
easeBoth: function (t, b, c, d) {
- if ((t/=d/2) < 1) {
+ if ((t /= d/2) < 1) {
return c/2*t*t + b;
}
-
+
return -c/2 * ((--t)*(t-2) - 1) + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quartic)
* @method easeInStrong
@@ -93,7 +108,7 @@ var Easing = {
easeInStrong: function (t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
-
+
/**
* Begins quickly and decelerates towards end. (quartic)
* @method easeOutStrong
@@ -106,7 +121,7 @@ var Easing = {
easeOutStrong: function (t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quartic)
* @method easeBothStrong
@@ -117,10 +132,10 @@ var Easing = {
* @return {Number} The computed value for the current animation frame
*/
easeBothStrong: function (t, b, c, d) {
- if ((t/=d/2) < 1) {
+ if ((t /= d/2) < 1) {
return c/2*t*t*t*t + b;
}
-
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
@@ -147,15 +162,15 @@ var Easing = {
if (!p) {
p = d* 0.3;
}
-
+
if (!a || a < Math.abs(c)) {
- a = c;
+ a = c;
s = p/4;
}
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
@@ -181,7 +196,7 @@ var Easing = {
if (!p) {
p=d * 0.3;
}
-
+
if (!a || a < Math.abs(c)) {
a = c;
s = p / 4;
@@ -189,10 +204,10 @@ var Easing = {
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
-
+
/**
* Snap both elastic effect.
* @method elasticBoth
@@ -209,28 +224,28 @@ var Easing = {
if (t === 0) {
return b;
}
-
+
if ( (t /= d/2) === 2 ) {
return b+c;
}
-
+
if (!p) {
p = d*(0.3*1.5);
}
-
+
if ( !a || a < Math.abs(c) ) {
- a = c;
+ a = c;
s = p/4;
}
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
if (t < 1) {
- return -0.5*(a*Math.pow(2,10*(t-=1)) *
+ return -0.5*(a*Math.pow(2,10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
}
- return a*Math.pow(2,-10*(t-=1)) *
+ return a*Math.pow(2,-10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;
},
@@ -271,9 +286,9 @@ var Easing = {
}
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
-
+
/**
- * Backtracks slightly, then reverses direction, overshoots end,
+ * Backtracks slightly, then reverses direction, overshoots end,
* then reverses and comes back to end.
* @method backBoth
* @param {Number} t Time value used to compute current value
@@ -285,9 +300,9 @@ var Easing = {
*/
backBoth: function (t, b, c, d, s) {
if (typeof s === 'undefined') {
- s = 1.70158;
+ s = 1.70158;
}
-
+
if ((t /= d/2 ) < 1) {
return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
}
@@ -306,7 +321,7 @@ var Easing = {
bounceIn: function (t, b, c, d) {
return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;
},
-
+
/**
* Bounces off end.
* @method bounceOut
@@ -326,7 +341,7 @@ var Easing = {
}
return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;
},
-
+
/**
* Bounces off start and end.
* @method bounceBoth
View
81 build/anim-easing/anim-easing.js
@@ -5,13 +5,28 @@ TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of contributors may be used to
+ endorse or promote products derived from this software without specific prior
+ written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
@@ -37,7 +52,7 @@ var Easing = {
easeNone: function (t, b, c, d) {
return c*t/d + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quadratic)
* @method easeIn
@@ -63,7 +78,7 @@ var Easing = {
easeOut: function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quadratic)
* @method easeBoth
@@ -74,13 +89,13 @@ var Easing = {
* @return {Number} The computed value for the current animation frame
*/
easeBoth: function (t, b, c, d) {
- if ((t/=d/2) < 1) {
+ if ((t /= d/2) < 1) {
return c/2*t*t + b;
}
-
+
return -c/2 * ((--t)*(t-2) - 1) + b;
},
-
+
/**
* Begins slowly and accelerates towards end. (quartic)
* @method easeInStrong
@@ -93,7 +108,7 @@ var Easing = {
easeInStrong: function (t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
-
+
/**
* Begins quickly and decelerates towards end. (quartic)
* @method easeOutStrong
@@ -106,7 +121,7 @@ var Easing = {
easeOutStrong: function (t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
-
+
/**
* Begins slowly and decelerates towards end. (quartic)
* @method easeBothStrong
@@ -117,10 +132,10 @@ var Easing = {
* @return {Number} The computed value for the current animation frame
*/
easeBothStrong: function (t, b, c, d) {
- if ((t/=d/2) < 1) {
+ if ((t /= d/2) < 1) {
return c/2*t*t*t*t + b;
}
-
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
@@ -147,15 +162,15 @@ var Easing = {
if (!p) {
p = d* 0.3;
}
-
+
if (!a || a < Math.abs(c)) {
- a = c;
+ a = c;
s = p/4;
}
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
@@ -181,7 +196,7 @@ var Easing = {
if (!p) {
p=d * 0.3;
}
-
+
if (!a || a < Math.abs(c)) {
a = c;
s = p / 4;
@@ -189,10 +204,10 @@ var Easing = {
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
-
+
/**
* Snap both elastic effect.
* @method elasticBoth
@@ -209,28 +224,28 @@ var Easing = {
if (t === 0) {
return b;
}
-
+
if ( (t /= d/2) === 2 ) {
return b+c;
}
-
+
if (!p) {
p = d*(0.3*1.5);
}
-
+
if ( !a || a < Math.abs(c) ) {
- a = c;
+ a = c;
s = p/4;
}
else {
s = p/(2*Math.PI) * Math.asin (c/a);
}
-
+
if (t < 1) {
- return -0.5*(a*Math.pow(2,10*(t-=1)) *
+ return -0.5*(a*Math.pow(2,10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
}
- return a*Math.pow(2,-10*(t-=1)) *
+ return a*Math.pow(2,-10*(t-=1)) *
Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b;
},
@@ -271,9 +286,9 @@ var Easing = {
}
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
-
+
/**
- * Backtracks slightly, then reverses direction, overshoots end,
+ * Backtracks slightly, then reverses direction, overshoots end,
* then reverses and comes back to end.
* @method backBoth
* @param {Number} t Time value used to compute current value
@@ -285,9 +300,9 @@ var Easing = {
*/
backBoth: function (t, b, c, d, s) {
if (typeof s === 'undefined') {
- s = 1.70158;
+ s = 1.70158;
}
-
+
if ((t /= d/2 ) < 1) {
return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
}
@@ -306,7 +321,7 @@ var Easing = {
bounceIn: function (t, b, c, d) {
return c - Y.Easing.bounceOut(d-t, 0, c, d) + b;
},
-
+
/**
* Bounces off end.
* @method bounceOut
@@ -326,7 +341,7 @@ var Easing = {
}
return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b;
},
-
+
/**
* Bounces off start and end.
* @method bounceBoth
View
4 build/anim-scroll/anim-scroll-coverage.js
@@ -26,7 +26,7 @@ _yuitest_coverage["build/anim-scroll/anim-scroll.js"] = {
path: "build/anim-scroll/anim-scroll.js",
code: []
};
-_yuitest_coverage["build/anim-scroll/anim-scroll.js"].code=["YUI.add('anim-scroll', function (Y, NAME) {","","/**"," * Adds support for the <code>scroll</code> property in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-scroll"," */","","var NUM = Number;","","//TODO: deprecate for scrollTop/Left properties?","Y.Anim.behaviors.scroll = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," var"," node = anim._node, "," val = (["," fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),"," fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)"," ]);",""," if (val[0]) {"," node.set('scrollLeft', val[0]);"," }",""," if (val[1]) {"," node.set('scrollTop', val[1]);"," }"," },"," get: function(anim) {"," var node = anim._node;"," return [node.get('scrollLeft'), node.get('scrollTop')];"," }","};","","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
+_yuitest_coverage["build/anim-scroll/anim-scroll.js"].code=["YUI.add('anim-scroll', function (Y, NAME) {","","/**"," * Adds support for the <code>scroll</code> property in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-scroll"," */","","var NUM = Number;","","//TODO: deprecate for scrollTop/Left properties?","Y.Anim.behaviors.scroll = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," var"," node = anim._node,"," val = (["," fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),"," fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)"," ]);",""," if (val[0]) {"," node.set('scrollLeft', val[0]);"," }",""," if (val[1]) {"," node.set('scrollTop', val[1]);"," }"," },"," get: function(anim) {"," var node = anim._node;"," return [node.get('scrollLeft'), node.get('scrollTop')];"," }","};","","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].lines = {"1":0,"10":0,"13":0,"15":0,"22":0,"23":0,"26":0,"27":0,"31":0,"32":0};
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].functions = {"set:14":0,"get:30":0,"(anonymous 1):1":0};
_yuitest_coverage["build/anim-scroll/anim-scroll.js"].coveredLines = 10;
@@ -52,7 +52,7 @@ Y.Anim.behaviors.scroll = {
_yuitest_coverfunc("build/anim-scroll/anim-scroll.js", "set", 14);
_yuitest_coverline("build/anim-scroll/anim-scroll.js", 15);
var
- node = anim._node,
+ node = anim._node,
val = ([
fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
View
2  build/anim-scroll/anim-scroll-debug.js
@@ -13,7 +13,7 @@ var NUM = Number;
Y.Anim.behaviors.scroll = {
set: function(anim, att, from, to, elapsed, duration, fn) {
var
- node = anim._node,
+ node = anim._node,
val = ([
fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
View
2  build/anim-scroll/anim-scroll.js
@@ -13,7 +13,7 @@ var NUM = Number;
Y.Anim.behaviors.scroll = {
set: function(anim, att, from, to, elapsed, duration, fn) {
var
- node = anim._node,
+ node = anim._node,
val = ([
fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
View
4 build/anim-xy/anim-xy-coverage.js
@@ -26,7 +26,7 @@ _yuitest_coverage["build/anim-xy/anim-xy.js"] = {
path: "build/anim-xy/anim-xy.js",
code: []
};
-_yuitest_coverage["build/anim-xy/anim-xy.js"].code=["YUI.add('anim-xy', function (Y, NAME) {","","/**"," * Adds support for the <code>xy</code> property in <code>from</code> and "," * <code>to</code> attributes."," * @module anim"," * @submodule anim-xy"," */","","var NUM = Number;","","Y.Anim.behaviors.xy = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setXY(["," fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),"," fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)"," ]);"," },"," get: function(anim) {"," return anim._node.getXY();"," }","};","","","","}, '@VERSION@', {\"requires\": [\"anim-base\", \"node-screen\"]});"];
+_yuitest_coverage["build/anim-xy/anim-xy.js"].code=["YUI.add('anim-xy', function (Y, NAME) {","","/**"," * Adds support for the <code>xy</code> property in <code>from</code> and"," * <code>to</code> attributes."," * @module anim"," * @submodule anim-xy"," */","","var NUM = Number;","","Y.Anim.behaviors.xy = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setXY(["," fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),"," fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)"," ]);"," },"," get: function(anim) {"," return anim._node.getXY();"," }","};","","","","}, '@VERSION@', {\"requires\": [\"anim-base\", \"node-screen\"]});"];
_yuitest_coverage["build/anim-xy/anim-xy.js"].lines = {"1":0,"10":0,"12":0,"14":0,"20":0};
_yuitest_coverage["build/anim-xy/anim-xy.js"].functions = {"set:13":0,"get:19":0,"(anonymous 1):1":0};
_yuitest_coverage["build/anim-xy/anim-xy.js"].coveredLines = 5;
@@ -35,7 +35,7 @@ _yuitest_coverline("build/anim-xy/anim-xy.js", 1);
YUI.add('anim-xy', function (Y, NAME) {
/**
- * Adds support for the <code>xy</code> property in <code>from</code> and
+ * Adds support for the <code>xy</code> property in <code>from</code> and
* <code>to</code> attributes.
* @module anim
* @submodule anim-xy
View
2  build/anim-xy/anim-xy-debug.js
@@ -1,7 +1,7 @@
YUI.add('anim-xy', function (Y, NAME) {
/**
- * Adds support for the <code>xy</code> property in <code>from</code> and
+ * Adds support for the <code>xy</code> property in <code>from</code> and
* <code>to</code> attributes.
* @module anim
* @submodule anim-xy
View
2  build/anim-xy/anim-xy.js
@@ -1,7 +1,7 @@
YUI.add('anim-xy', function (Y, NAME) {
/**
- * Adds support for the <code>xy</code> property in <code>from</code> and
+ * Adds support for the <code>xy</code> property in <code>from</code> and
* <code>to</code> attributes.
* @module anim
* @submodule anim-xy
View
13 build/app-content/app-content-coverage.js
@@ -26,8 +26,8 @@ _yuitest_coverage["build/app-content/app-content.js"] = {
path: "build/app-content/app-content.js",
code: []
};
-_yuitest_coverage["build/app-content/app-content.js"].code=["YUI.add('app-content', function (Y, NAME) {","","/**","`Y.App` extension that provides pjax-style content fetching and handling.","","@module app","@submodule app-content","@since 3.7.0","**/","","var PjaxContent = Y.PjaxContent;","","/**","`Y.App` extension that provides pjax-style content fetching and handling.","","This makes it easy to fetch server rendered content for URLs using Ajax. The","HTML content returned from the server will be view-ified and set as the app's","main content, making it seamless to use a mixture of server and client rendered","views.","","When the `\"app-content\"` module is used, it will automatically mix itself into","`Y.App`, and it provides three main features:",""," - **`Y.App.Content.route`**: A stack of middleware which forms a pjax-style"," content route.",""," - **`loadContent()`**: Route middleware which load content from a server. This"," makes an Ajax request for the requested URL, parses the returned content and"," puts it on the route's response object.",""," - **`showContent()`**: Method which provides an easy way to view-ify HTML"," content which should be shown as an app's active/visible view.","","The following is an example of how these features can be used:",""," // Creates a new app and registers the `\"post\"` view."," var app = new Y.App({"," views: {"," post: {type: Y.PostView}"," }"," });",""," // Uses a simple server rendered content route for the About page."," app.route('/about/', Y.App.Content.route);",""," // Uses the `loadContent()` middleware to fetch the contents of the post"," // from the server and shows that content in a `\"post\"` view."," app.route('/posts/:id/', 'loadContent', function (req, res, next) {"," this.showContent(res.content.node, {view: 'post'});"," });","","@class App.Content","@uses PjaxContent","@extensionfor App","@since 3.7.0","**/","function AppContent() {"," PjaxContent.apply(this, arguments);","}","","/**","A stack of middleware which forms a pjax-style content route.","","This route will load the rendered HTML content from the server, then create and","show a new view using those contents.","","@property route","@type Array","@static","@since 3.7.0","**/","AppContent.route = ['loadContent', '_contentRoute'];","","AppContent.prototype = {"," // -- Public Methods -------------------------------------------------------",""," /**"," Sets this app's `activeView` attribute using the specified `content`.",""," This provides an easy way to view-ify HTML content which should be shown as"," this app's active/visible view. This method will determine the appropriate"," view `container` node based on the specified `content`. By default, a new"," `Y.View` instance will be created unless `options.view` is specified.",""," Under the hood, this method calls the `showView()` method, so refer to its"," docs for more information.",""," @method showContent"," @param {HTMLElement|Node|String} content The content to show, it may be"," provided as a selector string, a DOM element, or a `Y.Node` instance."," @param {Object} [options] Optional objects containing any of the following"," properties in addition to any `showView()` options:",""," @param {Object|String} [options.view] The name of a view defined in this"," app's `views`, or an object with the following properties:",""," @param {String} options.view.name The name of a view defined in this"," app's `views`."," @param {Object} [options.view.config] Optional configuration to use when"," creating the new view instance. This config object can also be used"," to update an existing or preserved view's attributes when"," `options.update` is `true`. **Note:** If a `container` is specified,"," it will be overridden by the `content` specified in the first"," argument.",""," @param {Function} [callback] Optional callback function to call after the"," new `activeView` is ready to use. **Note:** this will override"," `options.callback` and it can be specified as either the second or third"," argument. The function will be passed the following:",""," @param {View} callback.view A reference to the new `activeView`.",""," @since 3.7.0"," @see App.showView()"," **/"," showContent: function (content, options, callback) {"," // Makes sure we have a node instance, and will query selector strings."," content = Y.one(content);",""," // Support the callback function being either the second or third arg."," if (typeof options === 'function') {"," options = {callback: options};"," callback = null;"," }",""," // Mix in default option to *not* render the view because presumably we"," // have pre-rendered content here. This also creates a copy so we can"," // modify the object."," options = Y.merge({render: false}, options);",""," var view = options.view || '',"," viewName = typeof view === 'string' ? view : view.name,"," viewConfig = typeof view !== 'string' ? view.config : {},"," viewInfo = this.getViewInfo(viewName),"," container, template, type, ViewConstructor;",""," // Remove `view` from the `options` which will be passed along to the"," // `showView()` method."," delete options.view;",""," // When the specified `content` is a document fragment, we want to see"," // if it only contains a single node, and use that as the content. This"," // checks `childNodes` which will include text nodes."," if (content && content.isFragment() &&"," content.get('childNodes').size() === 1) {",""," content = content.get('firstChild');"," }",""," // When the `content` is an element node (`nodeType` 1), we can use it"," // as-is for the `container`. Otherwise, we'll construct a new container"," // based on the `options.view`'s `containerTemplate`."," if (content && content.get('nodeType') === 1) {"," container = content;"," } else {"," type = (viewInfo && viewInfo.type) || Y.View;",""," // Looks for a namespaced constructor function on `Y`."," ViewConstructor = typeof type === 'string' ?"," Y.Object.getValue(Y, type.split('.')) : type;",""," // Find the correct node template for the view."," template = ViewConstructor.prototype.containerTemplate;"," container = Y.Node.create(template);",""," // Append the document fragment to the newly created `container`"," // node. This is the worst case where we have to create a wrapper"," // node around the `content`."," container.append(content);"," }",""," // Makes sure the view is created using _our_ `container` node."," viewConfig = Y.merge(viewConfig, {container: container});",""," // Finally switch to the new `activeView`. We want to make sure `view`"," // is a string if it's falsy, that way a new view will be created."," return this.showView(viewName, viewConfig, options, callback);"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Provides a default content route which will show a server rendered view.",""," **Note:** This route callback assumes that it's called after the"," `loadContent()` middleware.",""," @method _contentRoute"," @param {Object} req Request object."," @param {Object} res Response Object."," @param {Function} next Function to pass control to the next route callback."," @protected"," @since 3.7.0"," @see Y.App.Content.route"," **/"," _contentRoute: function (req, res, next) {"," var content = res.content,"," doc = Y.config.doc,"," activeViewHandle;",""," // We must have some content to work with."," if (!(content && content.node)) { return next(); }",""," if (content.title && doc) {"," // Make sure the `activeView` does actually change before we go"," // messing with the page title."," activeViewHandle = this.onceAfter('activeViewChange', function () {"," doc.title = content.title;"," });"," }",""," this.showContent(content.node);",""," // Detach the handle just in case."," if (activeViewHandle) {"," activeViewHandle.detach();"," }",""," next();"," }","};","","// Mix statics.","Y.mix(AppContent, PjaxContent);","// Mix prototype.","Y.mix(AppContent, PjaxContent, false, null, 1);","","// -- Namespace ----------------------------------------------------------------","Y.App.Content = AppContent;","Y.Base.mix(Y.App, [AppContent]);","","","}, '@VERSION@', {\"requires\": [\"app-base\", \"pjax-content\"]});"];
-_yuitest_coverage["build/app-content/app-content.js"].lines = {"1":0,"11":0,"57":0,"58":0,"72":0,"74":0,"118":0,"121":0,"122":0,"123":0,"129":0,"131":0,"139":0,"144":0,"147":0,"153":0,"154":0,"156":0,"159":0,"163":0,"164":0,"169":0,"173":0,"177":0,"197":0,"202":0,"204":0,"207":0,"208":0,"212":0,"215":0,"216":0,"219":0,"224":0,"226":0,"229":0,"230":0};
+_yuitest_coverage["build/app-content/app-content.js"].code=["YUI.add('app-content', function (Y, NAME) {","","/**","`Y.App` extension that provides pjax-style content fetching and handling.","","@module app","@submodule app-content","@since 3.7.0","**/","","var PjaxContent = Y.PjaxContent;","","/**","`Y.App` extension that provides pjax-style content fetching and handling.","","This makes it easy to fetch server rendered content for URLs using Ajax. The","HTML content returned from the server will be view-ified and set as the app's","main content, making it seamless to use a mixture of server and client rendered","views.","","When the `\"app-content\"` module is used, it will automatically mix itself into","`Y.App`, and it provides three main features:",""," - **`Y.App.Content.route`**: A stack of middleware which forms a pjax-style"," content route.",""," - **`loadContent()`**: Route middleware which load content from a server. This"," makes an Ajax request for the requested URL, parses the returned content and"," puts it on the route's response object.",""," - **`showContent()`**: Method which provides an easy way to view-ify HTML"," content which should be shown as an app's active/visible view.","","The following is an example of how these features can be used:",""," // Creates a new app and registers the `\"post\"` view."," var app = new Y.App({"," views: {"," post: {type: Y.PostView}"," }"," });",""," // Uses a simple server rendered content route for the About page."," app.route('/about/', Y.App.Content.route);",""," // Uses the `loadContent()` middleware to fetch the contents of the post"," // from the server and shows that content in a `\"post\"` view."," app.route('/posts/:id/', 'loadContent', function (req, res, next) {"," this.showContent(res.content.node, {view: 'post'});"," });","","@class App.Content","@uses PjaxContent","@extensionfor App","@since 3.7.0","**/","function AppContent() {"," PjaxContent.apply(this, arguments);","}","","/**","A stack of middleware which forms a pjax-style content route.","","This route will load the rendered HTML content from the server, then create and","show a new view using those contents.","","@property route","@type Array","@static","@since 3.7.0","**/","AppContent.route = ['loadContent', '_contentRoute'];","","AppContent.prototype = {"," // -- Public Methods -------------------------------------------------------",""," /**"," Sets this app's `activeView` attribute using the specified `content`.",""," This provides an easy way to view-ify HTML content which should be shown as"," this app's active/visible view. This method will determine the appropriate"," view `container` node based on the specified `content`. By default, a new"," `Y.View` instance will be created unless `options.view` is specified.",""," Under the hood, this method calls the `showView()` method, so refer to its"," docs for more information.",""," @method showContent"," @param {HTMLElement|Node|String} content The content to show, it may be"," provided as a selector string, a DOM element, or a `Y.Node` instance."," @param {Object} [options] Optional objects containing any of the following"," properties in addition to any `showView()` options:",""," @param {Object|String} [options.view] The name of a view defined in this"," app's `views`, or an object with the following properties:",""," @param {String} options.view.name The name of a view defined in this"," app's `views`."," @param {Object} [options.view.config] Optional configuration to use when"," creating the new view instance. This config object can also be used"," to update an existing or preserved view's attributes when"," `options.update` is `true`. **Note:** If a `container` is specified,"," it will be overridden by the `content` specified in the first"," argument.",""," @param {Function} [callback] Optional callback function to call after the"," new `activeView` is ready to use. **Note:** this will override"," `options.callback` and it can be specified as either the second or third"," argument. The function will be passed the following:",""," @param {View} callback.view A reference to the new `activeView`.",""," @since 3.7.0"," @see App.showView()"," **/"," showContent: function (content, options, callback) {"," // Makes sure we have a node instance, and will query selector strings."," content = Y.one(content);",""," // Support the callback function being either the second or third arg."," if (typeof options === 'function') {"," options = {callback: options};"," callback = null;"," }",""," // Mix in default option to *not* render the view because presumably we"," // have pre-rendered content here. This also creates a copy so we can"," // modify the object."," options = Y.merge({render: false}, options);",""," var view = options.view || '',"," viewName = typeof view === 'string' ? view : view.name,"," viewConfig = typeof view !== 'string' ? view.config : {},"," viewInfo = this.getViewInfo(viewName),"," container, template, type, ViewConstructor;",""," // Remove `view` from the `options` which will be passed along to the"," // `showView()` method."," delete options.view;",""," // When the specified `content` is a document fragment, we want to see"," // if it only contains a single node, and use that as the content. This"," // checks `childNodes` which will include text nodes."," if (content && content.isFragment() &&"," content.get('childNodes').size() === 1) {",""," content = content.get('firstChild');"," }",""," // When the `content` is an element node (`nodeType` 1), we can use it"," // as-is for the `container`. Otherwise, we'll construct a new container"," // based on the `options.view`'s `containerTemplate`."," if (content && content.get('nodeType') === 1) {"," container = content;"," } else {"," type = (viewInfo && viewInfo.type) || Y.View;",""," // Looks for a namespaced constructor function on `Y`."," ViewConstructor = typeof type === 'string' ?"," Y.Object.getValue(Y, type.split('.')) : type;",""," // Find the correct node template for the view."," template = ViewConstructor.prototype.containerTemplate;"," container = Y.Node.create(template);",""," // Append the document fragment to the newly created `container`"," // node. This is the worst case where we have to create a wrapper"," // node around the `content`."," container.append(content);"," }",""," // Makes sure the view is created using _our_ `container` node."," viewConfig = Y.merge(viewConfig, {container: container});",""," // Finally switch to the new `activeView`. We want to make sure `view`"," // is a string if it's falsy, that way a new view will be created."," return this.showView(viewName, viewConfig, options, callback);"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Provides a default content route which will show a server rendered view.",""," **Note:** This route callback assumes that it's called after the"," `loadContent()` middleware.",""," @method _contentRoute"," @param {Object} req Request object."," @param {Object} res Response Object."," @param {Function} next Function to pass control to the next route callback."," @protected"," @since 3.7.0"," @see Y.App.Content.route"," **/"," _contentRoute: function (req, res, next) {"," var content = res.content,"," doc = Y.config.doc,"," activeViewHandle;",""," // We must have some content to work with."," if (!(content && content.node)) { return next(); }",""," if (content.title && doc) {"," // Make sure the `activeView` does actually change before we go"," // messing with the page title."," activeViewHandle = this.onceAfter('activeViewChange', function () {"," doc.title = content.title;"," });"," }",""," this.showContent(content.node);",""," // Detach the handle just in case."," if (activeViewHandle) {"," activeViewHandle.detach();"," }",""," next();"," }","};","","// Mix statics.","AppContent.ATTRS = Y.Attribute.protectAttrs(PjaxContent.ATTRS);","","// Mix prototype.","Y.mix(AppContent, PjaxContent, false, null, 1);","","// -- Namespace ----------------------------------------------------------------","Y.App.Content = AppContent;","Y.Base.mix(Y.App, [AppContent]);","","","}, '@VERSION@', {\"requires\": [\"app-base\", \"pjax-content\"]});"];
+_yuitest_coverage["build/app-content/app-content.js"].lines = {"1":0,"11":0,"57":0,"58":0,"72":0,"74":0,"118":0,"121":0,"122":0,"123":0,"129":0,"131":0,"139":0,"144":0,"147":0,"153":0,"154":0,"156":0,"159":0,"163":0,"164":0,"169":0,"173":0,"177":0,"197":0,"202":0,"204":0,"207":0,"208":0,"212":0,"215":0,"216":0,"219":0,"224":0,"227":0,"230":0,"231":0};
_yuitest_coverage["build/app-content/app-content.js"].functions = {"AppContent:57":0,"showContent:116":0,"(anonymous 2):207":0,"_contentRoute:196":0,"(anonymous 1):1":0};
_yuitest_coverage["build/app-content/app-content.js"].coveredLines = 37;
_yuitest_coverage["build/app-content/app-content.js"].coveredFunctions = 5;
@@ -293,15 +293,16 @@ next();
// Mix statics.
_yuitest_coverline("build/app-content/app-content.js", 224);
-Y.mix(AppContent, PjaxContent);
+AppContent.ATTRS = Y.Attribute.protectAttrs(PjaxContent.ATTRS);
+
// Mix prototype.
-_yuitest_coverline("build/app-content/app-content.js", 226);
+_yuitest_coverline("build/app-content/app-content.js", 227);
Y.mix(AppContent, PjaxContent, false, null, 1);
// -- Namespace ----------------------------------------------------------------
-_yuitest_coverline("build/app-content/app-content.js", 229);
-Y.App.Content = AppContent;
_yuitest_coverline("build/app-content/app-content.js", 230);
+Y.App.Content = AppContent;
+_yuitest_coverline("build/app-content/app-content.js", 231);
Y.Base.mix(Y.App, [AppContent]);
View
3  build/app-content/app-content-debug.js
@@ -221,7 +221,8 @@ AppContent.prototype = {
};
// Mix statics.
-Y.mix(AppContent, PjaxContent);
+AppContent.ATTRS = Y.Attribute.protectAttrs(PjaxContent.ATTRS);
+
// Mix prototype.
Y.mix(AppContent, PjaxContent, false, null, 1);
View
2  build/app-content/app-content-min.js
@@ -1 +1 @@
-YUI.add("app-content",function(e,t){function r(){n.apply(this,arguments)}var n=e.PjaxContent;r.route=["loadContent","_contentRoute"],r.prototype={showContent:function(t,n,r){t=e.one(t),typeof n=="function"&&(n={callback:n},r=null),n=e.merge({render:!1},n);var i=n.view||"",s=typeof i=="string"?i:i.name,o=typeof i!="string"?i.config:{},u=this.getViewInfo(s),a,f,l,c;return delete n.view,t&&t.isFragment()&&t.get("childNodes").size()===1&&(t=t.get("firstChild")),t&&t.get("nodeType")===1?a=t:(l=u&&u.type||e.View,c=typeof l=="string"?e.Object.getValue(e,l.split(".")):l,f=c.prototype.containerTemplate,a=e.Node.create(f),a.append(t)),o=e.merge(o,{container:a}),this.showView(s,o,n,r)},_contentRoute:function(t,n,r){var i=n.content,s=e.config.doc,o;if(!i||!i.node)return r();i.title&&s&&(o=this.onceAfter("activeViewChange",function(){s.title=i.title})),this.showContent(i.node),o&&o.detach(),r()}},e.mix(r,n),e.mix(r,n,!1,null,1),e.App.Content=r,e.Base.mix(e.App,[r])},"@VERSION@",{requires:["app-base","pjax-content"]});
+YUI.add("app-content",function(e,t){function r(){n.apply(this,arguments)}var n=e.PjaxContent;r.route=["loadContent","_contentRoute"],r.prototype={showContent:function(t,n,r){t=e.one(t),typeof n=="function"&&(n={callback:n},r=null),n=e.merge({render:!1},n);var i=n.view||"",s=typeof i=="string"?i:i.name,o=typeof i!="string"?i.config:{},u=this.getViewInfo(s),a,f,l,c;return delete n.view,t&&t.isFragment()&&t.get("childNodes").size()===1&&(t=t.get("firstChild")),t&&t.get("nodeType")===1?a=t:(l=u&&u.type||e.View,c=typeof l=="string"?e.Object.getValue(e,l.split(".")):l,f=c.prototype.containerTemplate,a=e.Node.create(f),a.append(t)),o=e.merge(o,{container:a}),this.showView(s,o,n,r)},_contentRoute:function(t,n,r){var i=n.content,s=e.config.doc,o;if(!i||!i.node)return r();i.title&&s&&(o=this.onceAfter("activeViewChange",function(){s.title=i.title})),this.showContent(i.node),o&&o.detach(),r()}},r.ATTRS=e.Attribute.protectAttrs(n.ATTRS),e.mix(r,n,!1,null,1),e.App.Content=r,e.Base.mix(e.App,[r])},"@VERSION@",{requires:["app-base","pjax-content"]});
View
3  build/app-content/app-content.js
@@ -221,7 +221,8 @@ AppContent.prototype = {
};
// Mix statics.
-Y.mix(AppContent, PjaxContent);
+AppContent.ATTRS = Y.Attribute.protectAttrs(PjaxContent.ATTRS);
+
// Mix prototype.
Y.mix(AppContent, PjaxContent, false, null, 1);
View
95 build/attribute-base/attribute-base-coverage.js
@@ -26,17 +26,17 @@ _yuitest_coverage["build/attribute-base/attribute-base.js"] = {
path: "build/attribute-base/attribute-base.js",
code: []
};
-_yuitest_coverage["build/attribute-base/attribute-base.js"].code=["YUI.add('attribute-base', function (Y, NAME) {",""," /**"," * The attribute module provides an augmentable Attribute implementation, which "," * adds configurable attributes and attribute change events to the class being "," * augmented. It also provides a State class, which is used internally by Attribute,"," * but can also be used independently to provide a name/property/value data structure to"," * store state."," *"," * @module attribute"," */",""," /**"," * The attribute-base submodule provides core attribute handling support, with everything"," * aside from complex attribute handling in the provider's constructor."," *"," * @module attribute"," * @submodule attribute-base"," */"," "," /**"," * <p>"," * Attribute provides configurable attribute support along with attribute change events. It is designed to be "," * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state, "," * along with attribute change events."," * </p>"," * <p>For example, attributes added to the host can be configured:</p>"," * <ul>"," * <li>As read only.</li>"," * <li>As write once.</li>"," * <li>With a setter function, which can be used to manipulate"," * values passed to Attribute's <a href=\"#method_set\">set</a> method, before they are stored.</li>"," * <li>With a getter function, which can be used to manipulate stored values,"," * before they are returned by Attribute's <a href=\"#method_get\">get</a> method.</li>"," * <li>With a validator function, to validate values before they are stored.</li>"," * </ul>"," *"," * <p>See the <a href=\"#method_addAttr\">addAttr</a> method, for the complete set of configuration"," * options available for attributes.</p>"," *"," * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href=\"Base.html\">Base</a> class, "," * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration "," * of attributes for derived classes, accounting for values passed into the constructor.</p>"," *"," * @class Attribute"," * @param attrs {Object} The attributes to add during construction (passed through to <a href=\"#method_addAttrs\">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor."," * @param values {Object} The initial attribute values to apply (passed through to <a href=\"#method_addAttrs\">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required."," * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href=\"#method_addAttrs\">addAttrs</a>)."," * @uses AttributeCore"," * @uses AttributeEvents"," * @uses EventTarget"," * @uses AttributeExtras"," */"," var Attribute = function() {",""," // Fix #2531929 "," // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior."," // Too late in the release cycle to do anything about the core problem."," // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0)."," this._ATTR_E_FACADE = null;"," this._yuievt = null;",""," Y.AttributeCore.apply(this, arguments);"," Y.AttributeEvents.apply(this, arguments);"," Y.AttributeExtras.apply(this, arguments);"," };",""," Y.mix(Attribute, Y.AttributeCore, false, null, 1);"," Y.mix(Attribute, Y.AttributeExtras, false, null, 1);",""," // Needs to be \"true\", to overwrite methods from AttributeCore"," Y.mix(Attribute, Y.AttributeEvents, true, null, 1);",""," /**"," * <p>The value to return from an attribute setter in order to prevent the set from going through.</p>"," *"," * <p>You can return this value from your setter if you wish to combine validator and setter "," * functionality into a single setter function, which either returns the massaged value to be stored or "," * AttributeCore.INVALID_VALUE to prevent invalid values from being stored.</p>"," *"," * @property INVALID_VALUE"," * @type Object"," * @static"," * @final"," */"," Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;",""," /**"," * The list of properties which can be configured for "," * each attribute (e.g. setter, getter, writeOnce etc.)."," *"," * This property is used internally as a whitelist for faster"," * Y.mix operations."," *"," * @property _ATTR_CFG"," * @type Array"," * @static"," * @protected"," */"," Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG);",""," Y.Attribute = Attribute;","","}, '@VERSION@', {\"requires\": [\"attribute-core\", \"attribute-events\", \"attribute-extras\"]});"];
-_yuitest_coverage["build/attribute-base/attribute-base.js"].lines = {"1":0,"54":0,"60":0,"61":0,"63":0,"64":0,"65":0,"68":0,"69":0,"72":0,"86":0,"100":0,"102":0};
-_yuitest_coverage["build/attribute-base/attribute-base.js"].functions = {"Attribute:54":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/attribute-base/attribute-base.js"].coveredLines = 13;
+_yuitest_coverage["build/attribute-base/attribute-base.js"].code=["YUI.add('attribute-base', function (Y, NAME) {",""," /**"," * The attribute module provides an augmentable Attribute implementation, which"," * adds configurable attributes and attribute change events to the class being"," * augmented. It also provides a State class, which is used internally by Attribute,"," * but can also be used independently to provide a name/property/value data structure to"," * store state."," *"," * @module attribute"," */",""," /**"," * The attribute-base submodule provides core attribute handling support, with everything"," * aside from complex attribute handling in the provider's constructor."," *"," * @module attribute"," * @submodule attribute-base"," */",""," /**"," * <p>"," * Attribute provides configurable attribute support along with attribute change events. It is designed to be"," * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,"," * along with attribute change events."," * </p>"," * <p>For example, attributes added to the host can be configured:</p>"," * <ul>"," * <li>As read only.</li>"," * <li>As write once.</li>"," * <li>With a setter function, which can be used to manipulate"," * values passed to Attribute's <a href=\"#method_set\">set</a> method, before they are stored.</li>"," * <li>With a getter function, which can be used to manipulate stored values,"," * before they are returned by Attribute's <a href=\"#method_get\">get</a> method.</li>"," * <li>With a validator function, to validate values before they are stored.</li>"," * </ul>"," *"," * <p>See the <a href=\"#method_addAttr\">addAttr</a> method, for the complete set of configuration"," * options available for attributes.</p>"," *"," * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href=\"Base.html\">Base</a> class,"," * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration"," * of attributes for derived classes, accounting for values passed into the constructor.</p>"," *"," * @class Attribute"," * @param attrs {Object} The attributes to add during construction (passed through to <a href=\"#method_addAttrs\">addAttrs</a>)."," * These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor."," * @param values {Object} The initial attribute values to apply (passed through to <a href=\"#method_addAttrs\">addAttrs</a>)."," * These are not merged/cloned. The caller is responsible for isolating user provided values if required."," * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href=\"#method_addAttrs\">addAttrs</a>)."," * @uses AttributeCore"," * @uses AttributeObservable"," * @uses EventTarget"," * @uses AttributeExtras"," */"," function Attribute() {"," Y.AttributeCore.apply(this, arguments);"," Y.AttributeObservable.apply(this, arguments);"," Y.AttributeExtras.apply(this, arguments);"," }",""," Y.mix(Attribute, Y.AttributeCore, false, null, 1);"," Y.mix(Attribute, Y.AttributeExtras, false, null, 1);",""," // Needs to be `true`, to overwrite methods from AttributeCore"," Y.mix(Attribute, Y.AttributeObservable, true, null, 1);",""," /**"," * <p>The value to return from an attribute setter in order to prevent the set from going through.</p>"," *"," * <p>You can return this value from your setter if you wish to combine validator and setter"," * functionality into a single setter function, which either returns the massaged value to be stored or"," * AttributeCore.INVALID_VALUE to prevent invalid values from being stored.</p>"," *"," * @property INVALID_VALUE"," * @type Object"," * @static"," * @final"," */"," Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;",""," /**"," * The list of properties which can be configured for"," * each attribute (e.g. setter, getter, writeOnce etc.)."," *"," * This property is used internally as a whitelist for faster"," * Y.mix operations."," *"," * @property _ATTR_CFG"," * @type Array"," * @static"," * @protected"," */"," Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeObservable._ATTR_CFG);",""," /**"," * Utility method to protect an attribute configuration hash, by merging the"," * entire object and the individual attr config objects."," *"," * @method protectAttrs"," * @static"," * @param {Object} attrs A hash of attribute to configuration object pairs."," * @return {Object} A protected version of the `attrs` argument."," */"," Attribute.protectAttrs = Y.AttributeCore.protectAttrs;",""," Y.Attribute = Attribute;","","","}, '@VERSION@', {\"requires\": [\"attribute-core\", \"attribute-observable\", \"attribute-extras\"]});"];
+_yuitest_coverage["build/attribute-base/attribute-base.js"].lines = {"1":0,"56":0,"57":0,"58":0,"59":0,"62":0,"63":0,"66":0,"80":0,"94":0,"105":0,"107":0};
+_yuitest_coverage["build/attribute-base/attribute-base.js"].functions = {"Attribute:56":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/attribute-base/attribute-base.js"].coveredLines = 12;
_yuitest_coverage["build/attribute-base/attribute-base.js"].coveredFunctions = 2;
_yuitest_coverline("build/attribute-base/attribute-base.js", 1);
YUI.add('attribute-base', function (Y, NAME) {
/**
- * The attribute module provides an augmentable Attribute implementation, which
- * adds configurable attributes and attribute change events to the class being
+ * The attribute module provides an augmentable Attribute implementation, which
+ * adds configurable attributes and attribute change events to the class being
* augmented. It also provides a State class, which is used internally by Attribute,
* but can also be used independently to provide a name/property/value data structure to
* store state.
@@ -51,11 +51,11 @@ YUI.add('attribute-base', function (Y, NAME) {
* @module attribute
* @submodule attribute-base
*/
-
+
/**
* <p>
- * Attribute provides configurable attribute support along with attribute change events. It is designed to be
- * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
+ * Attribute provides configurable attribute support along with attribute change events. It is designed to be
+ * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
* along with attribute change events.
* </p>
* <p>For example, attributes added to the host can be configured:</p>
@@ -72,55 +72,47 @@ YUI.add('attribute-base', function (Y, NAME) {
* <p>See the <a href="#method_addAttr">addAttr</a> method, for the complete set of configuration
* options available for attributes.</p>
*
- * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
- * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
+ * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
+ * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
* of attributes for derived classes, accounting for values passed into the constructor.</p>
*
* @class Attribute
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
+ * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
+ * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These are not merged/cloned. The caller is responsible for isolating user provided values if required.
* @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
* @uses AttributeCore
- * @uses AttributeEvents
+ * @uses AttributeObservable
* @uses EventTarget
* @uses AttributeExtras
*/
_yuitest_coverfunc("build/attribute-base/attribute-base.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/attribute-base/attribute-base.js", 54);
-var Attribute = function() {
-
- // Fix #2531929
- // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior.
- // Too late in the release cycle to do anything about the core problem.
- // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0).
- _yuitest_coverfunc("build/attribute-base/attribute-base.js", "Attribute", 54);
-_yuitest_coverline("build/attribute-base/attribute-base.js", 60);
-this._ATTR_E_FACADE = null;
- _yuitest_coverline("build/attribute-base/attribute-base.js", 61);
-this._yuievt = null;
-
- _yuitest_coverline("build/attribute-base/attribute-base.js", 63);
+_yuitest_coverline("build/attribute-base/attribute-base.js", 56);
+function Attribute() {
+ _yuitest_coverfunc("build/attribute-base/attribute-base.js", "Attribute", 56);
+_yuitest_coverline("build/attribute-base/attribute-base.js", 57);
Y.AttributeCore.apply(this, arguments);
- _yuitest_coverline("build/attribute-base/attribute-base.js", 64);
-Y.AttributeEvents.apply(this, arguments);
- _yuitest_coverline("build/attribute-base/attribute-base.js", 65);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 58);
+Y.AttributeObservable.apply(this, arguments);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 59);
Y.AttributeExtras.apply(this, arguments);
- };
+ }
- _yuitest_coverline("build/attribute-base/attribute-base.js", 68);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 62);
Y.mix(Attribute, Y.AttributeCore, false, null, 1);
- _yuitest_coverline("build/attribute-base/attribute-base.js", 69);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 63);
Y.mix(Attribute, Y.AttributeExtras, false, null, 1);
- // Needs to be "true", to overwrite methods from AttributeCore
- _yuitest_coverline("build/attribute-base/attribute-base.js", 72);
-Y.mix(Attribute, Y.AttributeEvents, true, null, 1);
+ // Needs to be `true`, to overwrite methods from AttributeCore
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 66);
+Y.mix(Attribute, Y.AttributeObservable, true, null, 1);
/**
* <p>The value to return from an attribute setter in order to prevent the set from going through.</p>
*
- * <p>You can return this value from your setter if you wish to combine validator and setter
- * functionality into a single setter function, which either returns the massaged value to be stored or
+ * <p>You can return this value from your setter if you wish to combine validator and setter
+ * functionality into a single setter function, which either returns the massaged value to be stored or
* AttributeCore.INVALID_VALUE to prevent invalid values from being stored.</p>
*
* @property INVALID_VALUE
@@ -128,11 +120,11 @@ Y.mix(Attribute, Y.AttributeEvents, true, null, 1);
* @static
* @final
*/
- _yuitest_coverline("build/attribute-base/attribute-base.js", 86);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 80);
Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;
/**
- * The list of properties which can be configured for
+ * The list of properties which can be configured for
* each attribute (e.g. setter, getter, writeOnce etc.).
*
* This property is used internally as a whitelist for faster
@@ -143,10 +135,23 @@ Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;
* @static
* @protected
*/
- _yuitest_coverline("build/attribute-base/attribute-base.js", 100);
-Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 94);
+Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeObservable._ATTR_CFG);
+
+ /**
+ * Utility method to protect an attribute configuration hash, by merging the
+ * entire object and the individual attr config objects.
+ *
+ * @method protectAttrs
+ * @static
+ * @param {Object} attrs A hash of attribute to configuration object pairs.
+ * @return {Object} A protected version of the `attrs` argument.
+ */
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 105);
+Attribute.protectAttrs = Y.AttributeCore.protectAttrs;
- _yuitest_coverline("build/attribute-base/attribute-base.js", 102);
+ _yuitest_coverline("build/attribute-base/attribute-base.js", 107);
Y.Attribute = Attribute;
-}, '@VERSION@', {"requires": ["attribute-core", "attribute-events", "attribute-extras"]});
+
+}, '@VERSION@', {"requires": ["attribute-core", "attribute-observable", "attribute-extras"]});
View
62 build/attribute-base/attribute-base-debug.js
@@ -1,8 +1,8 @@
YUI.add('attribute-base', function (Y, NAME) {
/**
- * The attribute module provides an augmentable Attribute implementation, which
- * adds configurable attributes and attribute change events to the class being
+ * The attribute module provides an augmentable Attribute implementation, which
+ * adds configurable attributes and attribute change events to the class being
* augmented. It also provides a State class, which is used internally by Attribute,
* but can also be used independently to provide a name/property/value data structure to
* store state.
@@ -17,11 +17,11 @@ YUI.add('attribute-base', function (Y, NAME) {
* @module attribute
* @submodule attribute-base
*/
-
+
/**
* <p>
- * Attribute provides configurable attribute support along with attribute change events. It is designed to be
- * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
+ * Attribute provides configurable attribute support along with attribute change events. It is designed to be
+ * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
* along with attribute change events.
* </p>
* <p>For example, attributes added to the host can be configured:</p>
@@ -38,44 +38,38 @@ YUI.add('attribute-base', function (Y, NAME) {
* <p>See the <a href="#method_addAttr">addAttr</a> method, for the complete set of configuration
* options available for attributes.</p>
*
- * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
- * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
+ * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
+ * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
* of attributes for derived classes, accounting for values passed into the constructor.</p>
*
* @class Attribute
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
+ * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
+ * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These are not merged/cloned. The caller is responsible for isolating user provided values if required.
* @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
* @uses AttributeCore
- * @uses AttributeEvents
+ * @uses AttributeObservable
* @uses EventTarget
* @uses AttributeExtras
*/
- var Attribute = function() {
-
- // Fix #2531929
- // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior.
- // Too late in the release cycle to do anything about the core problem.
- // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0).
- this._ATTR_E_FACADE = null;
- this._yuievt = null;
-
+ function Attribute() {
Y.AttributeCore.apply(this, arguments);
- Y.AttributeEvents.apply(this, arguments);
+ Y.AttributeObservable.apply(this, arguments);
Y.AttributeExtras.apply(this, arguments);
- };
+ }
Y.mix(Attribute, Y.AttributeCore, false, null, 1);
Y.mix(Attribute, Y.AttributeExtras, false, null, 1);
- // Needs to be "true", to overwrite methods from AttributeCore
- Y.mix(Attribute, Y.AttributeEvents, true, null, 1);
+ // Needs to be `true`, to overwrite methods from AttributeCore
+ Y.mix(Attribute, Y.AttributeObservable, true, null, 1);
/**
* <p>The value to return from an attribute setter in order to prevent the set from going through.</p>
*
- * <p>You can return this value from your setter if you wish to combine validator and setter
- * functionality into a single setter function, which either returns the massaged value to be stored or
+ * <p>You can return this value from your setter if you wish to combine validator and setter
+ * functionality into a single setter function, which either returns the massaged value to be stored or
* AttributeCore.INVALID_VALUE to prevent invalid values from being stored.</p>
*
* @property INVALID_VALUE
@@ -86,7 +80,7 @@ YUI.add('attribute-base', function (Y, NAME) {
Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;
/**
- * The list of properties which can be configured for
+ * The list of properties which can be configured for
* each attribute (e.g. setter, getter, writeOnce etc.).
*
* This property is used internally as a whitelist for faster
@@ -97,8 +91,20 @@ YUI.add('attribute-base', function (Y, NAME) {
* @static
* @protected
*/
- Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG);
+ Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeObservable._ATTR_CFG);
+
+ /**
+ * Utility method to protect an attribute configuration hash, by merging the
+ * entire object and the individual attr config objects.
+ *
+ * @method protectAttrs
+ * @static
+ * @param {Object} attrs A hash of attribute to configuration object pairs.
+ * @return {Object} A protected version of the `attrs` argument.
+ */
+ Attribute.protectAttrs = Y.AttributeCore.protectAttrs;
Y.Attribute = Attribute;
-}, '@VERSION@', {"requires": ["attribute-core", "attribute-events", "attribute-extras"]});
+
+}, '@VERSION@', {"requires": ["attribute-core", "attribute-observable", "attribute-extras"]});
View
2  build/attribute-base/attribute-base-min.js
@@ -1 +1 @@
-YUI.add("attribute-base",function(e,t){var n=function(){this._ATTR_E_FACADE=null,this._yuievt=null,e.AttributeCore.apply(this,arguments),e.AttributeEvents.apply(this,arguments),e.AttributeExtras.apply(this,arguments)};e.mix(n,e.AttributeCore,!1,null,1),e.mix(n,e.AttributeExtras,!1,null,1),e.mix(n,e.AttributeEvents,!0,null,1),n.INVALID_VALUE=e.AttributeCore.INVALID_VALUE,n._ATTR_CFG=e.AttributeCore._ATTR_CFG.concat(e.AttributeEvents._ATTR_CFG),e.Attribute=n},"@VERSION@",{requires:["attribute-core","attribute-events","attribute-extras"]});
+YUI.add("attribute-base",function(e,t){function n(){e.AttributeCore.apply(this,arguments),e.AttributeObservable.apply(this,arguments),e.AttributeExtras.apply(this,arguments)}e.mix(n,e.AttributeCore,!1,null,1),e.mix(n,e.AttributeExtras,!1,null,1),e.mix(n,e.AttributeObservable,!0,null,1),n.INVALID_VALUE=e.AttributeCore.INVALID_VALUE,n._ATTR_CFG=e.AttributeCore._ATTR_CFG.concat(e.AttributeObservable._ATTR_CFG),n.protectAttrs=e.AttributeCore.protectAttrs,e.Attribute=n},"@VERSION@",{requires:["attribute-core","attribute-observable","attribute-extras"]});
View
62 build/attribute-base/attribute-base.js
@@ -1,8 +1,8 @@
YUI.add('attribute-base', function (Y, NAME) {
/**
- * The attribute module provides an augmentable Attribute implementation, which
- * adds configurable attributes and attribute change events to the class being
+ * The attribute module provides an augmentable Attribute implementation, which
+ * adds configurable attributes and attribute change events to the class being
* augmented. It also provides a State class, which is used internally by Attribute,
* but can also be used independently to provide a name/property/value data structure to
* store state.
@@ -17,11 +17,11 @@ YUI.add('attribute-base', function (Y, NAME) {
* @module attribute
* @submodule attribute-base
*/
-
+
/**
* <p>
- * Attribute provides configurable attribute support along with attribute change events. It is designed to be
- * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
+ * Attribute provides configurable attribute support along with attribute change events. It is designed to be
+ * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
* along with attribute change events.
* </p>
* <p>For example, attributes added to the host can be configured:</p>
@@ -38,44 +38,38 @@ YUI.add('attribute-base', function (Y, NAME) {
* <p>See the <a href="#method_addAttr">addAttr</a> method, for the complete set of configuration
* options available for attributes.</p>
*
- * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
- * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
+ * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
+ * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
* of attributes for derived classes, accounting for values passed into the constructor.</p>
*
* @class Attribute
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
+ * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
+ * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>).
+ * These are not merged/cloned. The caller is responsible for isolating user provided values if required.
* @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
* @uses AttributeCore
- * @uses AttributeEvents
+ * @uses AttributeObservable
* @uses EventTarget
* @uses AttributeExtras
*/
- var Attribute = function() {
-
- // Fix #2531929
- // Complete hack, to make sure the first clone of a node value in IE doesn't doesn't hurt state - maintains 3.4.1 behavior.
- // Too late in the release cycle to do anything about the core problem.
- // The root issue is that cloning a Y.Node instance results in an object which barfs in IE, when you access it's properties (since 3.3.0).
- this._ATTR_E_FACADE = null;
- this._yuievt = null;
-
+ function Attribute() {
Y.AttributeCore.apply(this, arguments);
- Y.AttributeEvents.apply(this, arguments);
+ Y.AttributeObservable.apply(this, arguments);
Y.AttributeExtras.apply(this, arguments);
- };
+ }
Y.mix(Attribute, Y.AttributeCore, false, null, 1);
Y.mix(Attribute, Y.AttributeExtras, false, null, 1);
- // Needs to be "true", to overwrite methods from AttributeCore
- Y.mix(Attribute, Y.AttributeEvents, true, null, 1);
+ // Needs to be `true`, to overwrite methods from AttributeCore
+ Y.mix(Attribute, Y.AttributeObservable, true, null, 1);
/**
* <p>The value to return from an attribute setter in order to prevent the set from going through.</p>
*
- * <p>You can return this value from your setter if you wish to combine validator and setter
- * functionality into a single setter function, which either returns the massaged value to be stored or
+ * <p>You can return this value from your setter if you wish to combine validator and setter
+ * functionality into a single setter function, which either returns the massaged value to be stored or
* AttributeCore.INVALID_VALUE to prevent invalid values from being stored.</p>
*
* @property INVALID_VALUE
@@ -86,7 +80,7 @@ YUI.add('attribute-base', function (Y, NAME) {
Attribute.INVALID_VALUE = Y.AttributeCore.INVALID_VALUE;
/**
- * The list of properties which can be configured for
+ * The list of properties which can be configured for
* each attribute (e.g. setter, getter, writeOnce etc.).
*
* This property is used internally as a whitelist for faster
@@ -97,8 +91,20 @@ YUI.add('attribute-base', function (Y, NAME) {
* @static
* @protected
*/
- Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeEvents._ATTR_CFG);
+ Attribute._ATTR_CFG = Y.AttributeCore._ATTR_CFG.concat(Y.AttributeObservable._ATTR_CFG);
+
+ /**
+ * Utility method to protect an attribute configuration hash, by merging the
+ * entire object and the individual attr config objects.
+ *
+ * @method protectAttrs
+ * @static
+ * @param {Object} attrs A hash of attribute to configuration object pairs.
+ * @return {Object} A protected version of the `attrs` argument.
+ */
+ Attribute.protectAttrs = Y.AttributeCore.protectAttrs;
Y.Attribute = Attribute;
-}, '@VERSION@', {"requires": ["attribute-core", "attribute-events", "attribute-extras"]});
+
+}, '@VERSION@', {"requires": ["attribute-core", "attribute-observable", "attribute-extras"]});
View
151 build/attribute-complex/attribute-complex-coverage.js
@@ -26,11 +26,11 @@ _yuitest_coverage["build/attribute-complex/attribute-complex.js"] = {
path: "build/attribute-complex/attribute-complex.js",
code: []
};
-_yuitest_coverage["build/attribute-complex/attribute-complex.js"].code=["YUI.add('attribute-complex', function (Y, NAME) {",""," /**"," * Adds support for attribute providers to handle complex attributes in the constructor"," *"," * @module attribute"," * @submodule attribute-complex"," * @for Attribute"," */",""," var O = Y.Object,"," DOT = \".\";",""," Y.Attribute.Complex = function() {};"," Y.Attribute.Complex.prototype = {",""," /**"," * Utility method to split out simple attribute name/value pairs (\"x\") "," * from complex attribute name/value pairs (\"x.y.z\"), so that complex"," * attributes can be keyed by the top level attribute name."," *"," * @method _normAttrVals"," * @param {Object} valueHash An object with attribute name/value pairs"," *"," * @return {Object} An object literal with 2 properties - \"simple\" and \"complex\","," * containing simple and complex attribute values respectively keyed "," * by the top level attribute name, or null, if valueHash is falsey."," *"," * @private"," */"," _normAttrVals : function(valueHash) {"," var vals = {},"," subvals = {},"," path,"," attr,"," v, k;",""," if (valueHash) {"," for (k in valueHash) {"," if (valueHash.hasOwnProperty(k)) {"," if (k.indexOf(DOT) !== -1) {"," path = k.split(DOT);"," attr = path.shift();"," v = subvals[attr] = subvals[attr] || [];"," v[v.length] = {"," path : path,"," value: valueHash[k]"," };"," } else {"," vals[k] = valueHash[k];"," }"," }"," }"," return { simple:vals, complex:subvals };"," } else {"," return null;"," }"," },",""," /**"," * Returns the initial value of the given attribute from"," * either the default configuration provided, or the "," * over-ridden value if it exists in the set of initValues "," * provided and the attribute is not read-only."," *"," * @param {String} attr The name of the attribute"," * @param {Object} cfg The attribute configuration object"," * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals"," *"," * @return {Any} The initial value of the attribute."," *"," * @method _getAttrInitVal"," * @private"," */"," _getAttrInitVal : function(attr, cfg, initValues) {",""," var val = cfg.value,"," valFn = cfg.valueFn,"," tmpVal,"," initValSet = false,"," simple,"," complex,"," i,"," l,"," path,"," subval,"," subvals;",""," if (!cfg.readOnly && initValues) {"," // Simple Attributes"," simple = initValues.simple;"," if (simple && simple.hasOwnProperty(attr)) {"," val = simple[attr];"," initValSet = true;"," }"," }",""," if (valFn && !initValSet) {"," if (!valFn.call) {"," valFn = this[valFn];"," }"," if (valFn) {"," tmpVal = valFn.call(this, attr);"," val = tmpVal;"," }"," }",""," if (!cfg.readOnly && initValues) {",""," // Complex Attributes (complex values applied, after simple, in case both are set)"," complex = initValues.complex;",""," if (complex && complex.hasOwnProperty(attr) && (val !== undefined) && (val !== null)) {"," subvals = complex[attr];"," for (i = 0, l = subvals.length; i < l; ++i) {"," path = subvals[i].path;"," subval = subvals[i].value;"," O.setValue(val, path, subval);"," }"," }"," }",""," return val;"," }"," };",""," Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1);",""," // Consistency with the rest of the Attribute addons for now. "," Y.AttributeComplex = Y.Attribute.Complex;","","","}, '@VERSION@', {\"requires\": [\"attribute-base\"]});"];
-_yuitest_coverage["build/attribute-complex/attribute-complex.js"].lines = {"1":0,"11":0,"14":0,"15":0,"32":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"50":0,"54":0,"56":0,"77":0,"89":0,"91":0,"92":0,"93":0,"94":0,"98":0,"99":0,"100":0,"102":0,"103":0,"104":0,"108":0,"111":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"123":0,"127":0,"130":0};
-_yuitest_coverage["build/attribute-complex/attribute-complex.js"].functions = {"_normAttrVals:31":0,"_getAttrInitVal:75":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredLines = 39;
-_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredFunctions = 3;
+_yuitest_coverage["build/attribute-complex/attribute-complex.js"].code=["YUI.add('attribute-complex', function (Y, NAME) {",""," /**"," * Adds support for attribute providers to handle complex attributes in the constructor"," *"," * @module attribute"," * @submodule attribute-complex"," * @for Attribute"," * @deprecated AttributeComplex's overrides are now part of AttributeCore."," */",""," var Attribute = Y.Attribute;",""," Attribute.Complex = function() {};"," Attribute.Complex.prototype = {",""," /**"," * Utility method to split out simple attribute name/value pairs (\"x\")"," * from complex attribute name/value pairs (\"x.y.z\"), so that complex"," * attributes can be keyed by the top level attribute name."," *"," * @method _normAttrVals"," * @param {Object} valueHash An object with attribute name/value pairs"," *"," * @return {Object} An object literal with 2 properties - \"simple\" and \"complex\","," * containing simple and complex attribute values respectively keyed"," * by the top level attribute name, or null, if valueHash is falsey."," *"," * @private"," */"," _normAttrVals : Attribute.prototype._normAttrVals,",""," /**"," * Returns the initial value of the given attribute from"," * either the default configuration provided, or the"," * over-ridden value if it exists in the set of initValues"," * provided and the attribute is not read-only."," *"," * @param {String} attr The name of the attribute"," * @param {Object} cfg The attribute configuration object"," * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals"," *"," * @return {Any} The initial value of the attribute."," *"," * @method _getAttrInitVal"," * @private"," */"," _getAttrInitVal : Attribute.prototype._getAttrInitVal",""," };",""," // Consistency with the rest of the Attribute addons for now."," Y.AttributeComplex = Attribute.Complex;","","","}, '@VERSION@', {\"requires\": [\"attribute-base\"]});"];
+_yuitest_coverage["build/attribute-complex/attribute-complex.js"].lines = {"1":0,"12":0,"14":0,"15":0,"53":0};
+_yuitest_coverage["build/attribute-complex/attribute-complex.js"].functions = {"(anonymous 1):1":0};
+_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredLines = 5;
+_yuitest_coverage["build/attribute-complex/attribute-complex.js"].coveredFunctions = 1;
_yuitest_coverline("build/attribute-complex/attribute-complex.js", 1);
YUI.add('attribute-complex', function (Y, NAME) {
@@ -40,20 +40,20 @@ YUI.add('attribute-complex', function (Y, NAME) {
* @module attribute
* @submodule attribute-complex
* @for Attribute
+ * @deprecated AttributeComplex's overrides are now part of AttributeCore.
*/
_yuitest_coverfunc("build/attribute-complex/attribute-complex.js", "(anonymous 1)", 1);
-_yuitest_coverline("build/attribute-complex/attribute-complex.js", 11);
-var O = Y.Object,
- DOT = ".";
+_yuitest_coverline("build/attribute-complex/attribute-complex.js", 12);
+var Attribute = Y.Attribute;
_yuitest_coverline("build/attribute-complex/attribute-complex.js", 14);
-Y.Attribute.Complex = function() {};
+Attribute.Complex = function() {};
_yuitest_coverline("build/attribute-complex/attribute-complex.js", 15);
-Y.Attribute.Complex.prototype = {
+Attribute.Complex.prototype = {
/**
- * Utility method to split out simple attribute name/value pairs ("x")
+ * Utility method to split out simple attribute name/value pairs ("x")
* from complex attribute name/value pairs ("x.y.z"), so that complex
* attributes can be keyed by the top level attribute name.
*
@@ -61,57 +61,17 @@ Y.Attribute.Complex.prototype = {
* @param {Object} valueHash An object with attribute name/value pairs
*