Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 18 commits
  • 55 files changed
  • 0 commit comments
  • 2 contributors
Showing with 1,172 additions and 994 deletions.
  1. +1 −0 README.md
  2. +128 −128 build/anim-base/anim-base-coverage.js
  3. +37 −36 build/anim-base/anim-base-debug.js
  4. +1 −1 build/anim-base/anim-base-min.js
  5. +37 −36 build/anim-base/anim-base.js
  6. +6 −6 build/anim-color/anim-color-coverage.js
  7. +5 −5 build/anim-color/anim-color-debug.js
  8. +1 −1 build/anim-color/anim-color-min.js
  9. +5 −5 build/anim-color/anim-color.js
  10. +23 −22 build/anim-curve/anim-curve-coverage.js
  11. +13 −11 build/anim-curve/anim-curve-debug.js
  12. +1 −1 build/anim-curve/anim-curve-min.js
  13. +13 −11 build/anim-curve/anim-curve.js
  14. +88 −92 build/anim-shape/anim-shape-coverage.js
  15. +16 −20 build/anim-shape/anim-shape-debug.js
  16. +1 −1 build/anim-shape/anim-shape-min.js
  17. +16 −20 build/anim-shape/anim-shape.js
  18. +117 −109 build/event-focus/event-focus-coverage.js
  19. +16 −10 build/event-focus/event-focus-debug.js
  20. +1 −1 build/event-focus/event-focus-min.js
  21. +16 −10 build/event-focus/event-focus.js
  22. +2 −2 build/loader-base/loader-base-coverage.js
  23. +1 −1 build/loader-base/loader-base-debug.js
  24. +1 −1 build/loader-base/loader-base-min.js
  25. +1 −1 build/loader-base/loader-base.js
  26. +1 −1 build/loader/loader-debug.js
  27. +1 −1 build/loader/loader-min.js
  28. +1 −1 build/loader/loader.js
  29. +85 −72 build/pjax-base/pjax-base-coverage.js
  30. +14 −6 build/pjax-base/pjax-base-debug.js
  31. +1 −1 build/pjax-base/pjax-base-min.js
  32. +14 −6 build/pjax-base/pjax-base.js
  33. +3 −3 build/pjax-content/pjax-content-coverage.js
  34. +2 −2 build/pjax-content/pjax-content-debug.js
  35. +1 −1 build/pjax-content/pjax-content-min.js
  36. +2 −2 build/pjax-content/pjax-content.js
  37. +319 −306 build/router/router-coverage.js
  38. +20 −10 build/router/router-debug.js
  39. +1 −1 build/router/router-min.js
  40. +20 −10 build/router/router.js
  41. +1 −1 build/yui-nodejs/yui-nodejs-debug.js
  42. +1 −1 build/yui-nodejs/yui-nodejs-min.js
  43. +1 −1 build/yui-nodejs/yui-nodejs.js
  44. +1 −1 build/yui/yui-debug.js
  45. +1 −1 build/yui/yui-min.js
  46. +1 −1 build/yui/yui.js
  47. +8 −0 src/app/HISTORY.md
  48. +20 −10 src/app/js/router.js
  49. +15 −6 src/app/tests/unit/assets/app-content-test.js
  50. +47 −8 src/app/tests/unit/assets/router-test.js
  51. +1 −1 src/loader/build.json
  52. +8 −0 src/pjax/HISTORY.md
  53. +14 −6 src/pjax/js/pjax-base.js
  54. +2 −2 src/pjax/js/pjax-content.js
  55. +19 −1 src/pjax/tests/unit/assets/pjax-test.js
View
1 README.md
@@ -74,3 +74,4 @@ Shifter also allows you to rebuild the entire YUI src tree:
cd yui3/src && shifter --walk
+
View
256 build/anim-base/anim-base-coverage.js
@@ -26,10 +26,10 @@ _yuitest_coverage["build/anim-base/anim-base.js"] = {
path: "build/anim-base/anim-base.js",
code: []
};
-_yuitest_coverage["build/anim-base/anim-base.js"].code=["YUI.add('anim-base', function (Y, NAME) {","","/**","* The Animation Utility provides an API for creating advanced transitions.","* @module anim","*/","","/**","* Provides the base Anim class, for animating numeric properties.","*","* @module anim","* @submodule anim-base","*/",""," /**"," * A class for constructing animation instances."," * @class Anim"," * @for Anim"," * @constructor"," * @extends Base"," */",""," var RUNNING = 'running',"," START_TIME = 'startTime',"," ELAPSED_TIME = 'elapsedTime',"," /**"," * @for Anim"," * @event start"," * @description fires when an animation begins."," * @param {Event} ev The start event."," * @type Event.Custom"," */"," START = 'start',",""," /**"," * @event tween"," * @description fires every frame of the animation."," * @param {Event} ev The tween event."," * @type Event.Custom"," */"," TWEEN = 'tween',",""," /**"," * @event end"," * @description fires after the animation completes."," * @param {Event} ev The end event."," * @type Event.Custom"," */"," END = 'end',"," NODE = 'node',"," PAUSED = 'paused',"," REVERSE = 'reverse', // TODO: cleanup"," ITERATION_COUNT = 'iterationCount',",""," NUM = Number;",""," var _running = {},"," _timer;",""," Y.Anim = function() {"," Y.Anim.superclass.constructor.apply(this, arguments);"," Y.Anim._instances[Y.stamp(this)] = this;"," };",""," Y.Anim.NAME = 'anim';",""," Y.Anim._instances = {};",""," /**"," * Regex of properties that should use the default unit."," *"," * @property RE_DEFAULT_UNIT"," * @static"," */"," Y.Anim.RE_DEFAULT_UNIT = /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;",""," /**"," * The default unit to use with properties that pass the RE_DEFAULT_UNIT test."," *"," * @property DEFAULT_UNIT"," * @static"," */"," Y.Anim.DEFAULT_UNIT = 'px';",""," Y.Anim.DEFAULT_EASING = function (t, b, c, d) {"," return c * t / d + b; // linear easing"," };",""," /**"," * Time in milliseconds passed to setInterval for frame processing "," *"," * @property intervalTime"," * @default 20"," * @static"," */"," Y.Anim._intervalTime = 20;",""," /**"," * Bucket for custom getters and setters"," *"," * @property behaviors"," * @static"," */"," Y.Anim.behaviors = {"," left: {"," get: function(anim, attr) {"," return anim._getOffset(attr);"," }"," }"," };",""," Y.Anim.behaviors.top = Y.Anim.behaviors.left;",""," /**"," * The default setter to use when setting object properties."," *"," * @property DEFAULT_SETTER"," * @static"," */"," Y.Anim.DEFAULT_SETTER = function(anim, att, from, to, elapsed, duration, fn, unit) {"," var node = anim._node,"," domNode = node._node,"," val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);",""," if (domNode) {"," if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {"," unit = unit || '';"," node.setStyle(att, val + unit);"," } else if ('attributes' in domNode && att in domNode.attributes) {"," node.setAttribute(att, val);"," } else if (att in domNode) {"," domNode[att] = val;"," }"," } else if (node.set) {"," node.set(att, val);"," } else if (att in node) {"," node[att] = val;"," }"," };",""," /**"," * The default getter to use when getting object properties."," *"," * @property DEFAULT_GETTER"," * @static"," */"," Y.Anim.DEFAULT_GETTER = function(anim, att) {"," var node = anim._node,"," domNode = node._node,"," val = '';",""," if (domNode) {"," if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {"," val = node.getComputedStyle(att);"," } else if ('attributes' in domNode && att in domNode.attributes) {"," val = node.getAttribute(att);"," } else if (att in domNode) {"," val = domNode[att];"," }"," } else if (node.get) {"," val = node.get(att);"," } else if (att in node) {"," val = node[att];"," }",""," return val;"," };",""," Y.Anim.ATTRS = {"," /**"," * The object to be animated."," * @attribute node"," * @type Node"," */"," node: {"," setter: function(node) {"," if (node) {"," if (typeof node == 'string' || node.nodeType) {"," node = Y.one(node);"," }"," }",""," this._node = node;"," if (!node) {"," }"," return node;"," }"," },",""," /**"," * The length of the animation. Defaults to \"1\" (second)."," * @attribute duration"," * @type NUM"," */"," duration: {"," value: 1"," },",""," /**"," * The method that will provide values to the attribute(s) during the animation. "," * Defaults to \"Easing.easeNone\"."," * @attribute easing"," * @type Function"," */"," easing: {"," value: Y.Anim.DEFAULT_EASING,",""," setter: function(val) {"," if (typeof val === 'string' && Y.Easing) {"," return Y.Easing[val];"," }"," }"," },",""," /**"," * The starting values for the animated properties."," *"," * Fields may be strings, numbers, or functions."," * If a function is used, the return value becomes the from value."," * If no from value is specified, the DEFAULT_GETTER will be used."," * Supports any unit, provided it matches the \"to\" (or default)"," * unit (e.g. `{width: '10em', color: 'rgb(0, 0, 0)', borderColor: '#ccc'}`)."," *"," * If using the default ('px' for length-based units), the unit may be omitted"," * (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels"," * and hex, respectively)."," *"," * @attribute from"," * @type Object"," */"," from: {},",""," /**"," * The ending values for the animated properties."," *"," * Fields may be strings, numbers, or functions."," * Supports any unit, provided it matches the \"from\" (or default)"," * unit (e.g. `{width: '50%', color: 'red', borderColor: '#ccc'}`)."," *"," * If using the default ('px' for length-based units), the unit may be omitted"," * (e.g. `{width: 100, borderColor: 'ccc'}`, which defaults to pixels"," * and hex, respectively)."," *"," * @attribute to"," * @type Object"," */"," to: {},",""," /**"," * Date stamp for the first frame of the animation."," * @attribute startTime"," * @type Int"," * @default 0 "," * @readOnly"," */"," startTime: {"," value: 0,"," readOnly: true"," },",""," /**"," * Current time the animation has been running."," * @attribute elapsedTime"," * @type Int"," * @default 0 "," * @readOnly"," */"," elapsedTime: {"," value: 0,"," readOnly: true"," },",""," /**"," * Whether or not the animation is currently running."," * @attribute running "," * @type Boolean"," * @default false "," * @readOnly"," */"," running: {"," getter: function() {"," return !!_running[Y.stamp(this)];"," },"," value: false,"," readOnly: true"," },",""," /**"," * The number of times the animation should run "," * @attribute iterations"," * @type Int"," * @default 1 "," */"," iterations: {"," value: 1"," },",""," /**"," * The number of iterations that have occurred."," * Resets when an animation ends (reaches iteration count or stop() called). "," * @attribute iterationCount"," * @type Int"," * @default 0"," * @readOnly"," */"," iterationCount: {"," value: 0,"," readOnly: true"," },",""," /**"," * How iterations of the animation should behave. "," * Possible values are \"normal\" and \"alternate\"."," * Normal will repeat the animation, alternate will reverse on every other pass."," *"," * @attribute direction"," * @type String"," * @default \"normal\""," */"," direction: {"," value: 'normal' // | alternate (fwd on odd, rev on even per spec)"," },",""," /**"," * Whether or not the animation is currently paused."," * @attribute paused "," * @type Boolean"," * @default false "," * @readOnly"," */"," paused: {"," readOnly: true,"," value: false"," },",""," /**"," * If true, animation begins from last frame"," * @attribute reverse"," * @type Boolean"," * @default false "," */"," reverse: {"," value: false"," }","",""," };",""," /**"," * Runs all animation instances."," * @method run"," * @static"," */ "," Y.Anim.run = function() {"," var instances = Y.Anim._instances;"," for (var i in instances) {"," if (instances[i].run) {"," instances[i].run();"," }"," }"," };",""," /**"," * Pauses all animation instances."," * @method pause"," * @static"," */ "," Y.Anim.pause = function() {"," for (var i in _running) { // stop timer if nothing running"," if (_running[i].pause) {"," _running[i].pause();"," }"," }",""," Y.Anim._stopTimer();"," };",""," /**"," * Stops all animation instances."," * @method stop"," * @static"," */ "," Y.Anim.stop = function() {"," for (var i in _running) { // stop timer if nothing running"," if (_running[i].stop) {"," _running[i].stop();"," }"," }"," Y.Anim._stopTimer();"," };"," "," Y.Anim._startTimer = function() {"," if (!_timer) {"," _timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);"," }"," };",""," Y.Anim._stopTimer = function() {"," clearInterval(_timer);"," _timer = 0;"," };",""," /**"," * Called per Interval to handle each animation frame."," * @method _runFrame"," * @private"," * @static"," */ "," Y.Anim._runFrame = function() {"," var done = true;"," for (var anim in _running) {"," if (_running[anim]._runFrame) {"," done = false;"," _running[anim]._runFrame();"," }"," }",""," if (done) {"," Y.Anim._stopTimer();"," }"," };",""," Y.Anim.RE_UNITS = /^(-?\\d*\\.?\\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;",""," var proto = {"," /**"," * Starts or resumes an animation."," * @method run"," * @chainable"," */ "," run: function() {"," if (this.get(PAUSED)) {"," this._resume();"," } else if (!this.get(RUNNING)) {"," this._start();"," }"," return this;"," },",""," /**"," * Pauses the animation and"," * freezes it in its current state and time."," * Calling run() will continue where it left off."," * @method pause"," * @chainable"," */ "," pause: function() {"," if (this.get(RUNNING)) {"," this._pause();"," }"," return this;"," },",""," /**"," * Stops the animation and resets its time."," * @method stop"," * @param {Boolean} finish If true, the animation will move to the last frame"," * @chainable"," */ "," stop: function(finish) {"," if (this.get(RUNNING) || this.get(PAUSED)) {"," this._end(finish);"," }"," return this;"," },",""," _added: false,",""," _start: function() {"," this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));"," this._actualFrames = 0;"," if (!this.get(PAUSED)) {"," this._initAnimAttr();"," }"," _running[Y.stamp(this)] = this;"," Y.Anim._startTimer();",""," this.fire(START);"," },",""," _pause: function() {"," this._set(START_TIME, null);"," this._set(PAUSED, true);"," delete _running[Y.stamp(this)];",""," /**"," * @event pause"," * @description fires when an animation is paused."," * @param {Event} ev The pause event."," * @type Event.Custom"," */"," this.fire('pause');"," },",""," _resume: function() {"," this._set(PAUSED, false);"," _running[Y.stamp(this)] = this;"," this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));"," Y.Anim._startTimer();",""," /**"," * @event resume"," * @description fires when an animation is resumed (run from pause)."," * @param {Event} ev The pause event."," * @type Event.Custom"," */"," this.fire('resume');"," },",""," _end: function(finish) {"," var duration = this.get('duration') * 1000;"," if (finish) { // jump to last frame"," this._runAttrs(duration, duration, this.get(REVERSE));"," }",""," this._set(START_TIME, null);"," this._set(ELAPSED_TIME, 0);"," this._set(PAUSED, false);",""," delete _running[Y.stamp(this)];"," this.fire(END, {elapsed: this.get(ELAPSED_TIME)});"," },",""," _runFrame: function() {"," var d = this._runtimeAttr.duration,"," t = new Date() - this.get(START_TIME),"," reverse = this.get(REVERSE),"," done = (t >= d),"," attribute,"," setter;"," "," this._runAttrs(t, d, reverse);"," this._actualFrames += 1;"," this._set(ELAPSED_TIME, t);",""," this.fire(TWEEN);"," if (done) {"," this._lastFrame();"," }"," },",""," _runAttrs: function(t, d, reverse) {"," var attr = this._runtimeAttr,"," customAttr = Y.Anim.behaviors,"," easing = attr.easing,"," lastFrame = d,"," done = false,"," attribute,"," setter,"," i;",""," if (t >= d) {"," done = true;"," }",""," if (reverse) {"," t = d - t;"," lastFrame = 0;"," }",""," for (i in attr) {"," if (attr[i].to) {"," attribute = attr[i];"," setter = (i in customAttr && 'set' in customAttr[i]) ?"," customAttr[i].set : Y.Anim.DEFAULT_SETTER;",""," if (!done) {"," setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit); "," } else {"," setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit); "," }"," }"," }","",""," },",""," _lastFrame: function() {"," var iter = this.get('iterations'),"," iterCount = this.get(ITERATION_COUNT);",""," iterCount += 1;"," if (iter === 'infinite' || iterCount < iter) {"," if (this.get('direction') === 'alternate') {"," this.set(REVERSE, !this.get(REVERSE)); // flip it"," }"," /**"," * @event iteration"," * @description fires when an animation begins an iteration."," * @param {Event} ev The iteration event."," * @type Event.Custom"," */"," this.fire('iteration');"," } else {"," iterCount = 0;"," this._end();"," }",""," this._set(START_TIME, new Date());"," this._set(ITERATION_COUNT, iterCount);"," },",""," _initAnimAttr: function() {"," var from = this.get('from') || {},"," to = this.get('to') || {},"," attr = {"," duration: this.get('duration') * 1000,"," easing: this.get('easing')"," },"," customAttr = Y.Anim.behaviors,"," node = this.get(NODE), // implicit attr init"," unit, begin, end;",""," Y.each(to, function(val, name) {"," if (typeof val === 'function') {"," val = val.call(this, node);"," }",""," begin = from[name];"," if (begin === undefined) {"," begin = (name in customAttr && 'get' in customAttr[name]) ?"," customAttr[name].get(this, name) : Y.Anim.DEFAULT_GETTER(this, name);"," } else if (typeof begin === 'function') {"," begin = begin.call(this, node);"," }",""," var mFrom = Y.Anim.RE_UNITS.exec(begin);"," var mTo = Y.Anim.RE_UNITS.exec(val);",""," begin = mFrom ? mFrom[1] : begin;"," end = mTo ? mTo[1] : val;"," unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units",""," if (!unit && Y.Anim.RE_DEFAULT_UNIT.test(name)) {"," unit = Y.Anim.DEFAULT_UNIT;"," }",""," if (!begin || !end) {"," Y.error('invalid \"from\" or \"to\" for \"' + name + '\"', 'Anim');"," return;"," }",""," attr[name] = {"," from: Y.Lang.isObject(begin) ? Y.clone(begin) : begin,"," to: end,"," unit: unit"," };",""," }, this);",""," this._runtimeAttr = attr;"," },","",""," // TODO: move to computedStyle? (browsers dont agree on default computed offsets)"," _getOffset: function(attr) {"," var node = this._node,"," val = node.getComputedStyle(attr),"," get = (attr === 'left') ? 'getX': 'getY',"," set = (attr === 'left') ? 'setX': 'setY';",""," if (val === 'auto') {"," var position = node.getStyle('position');"," if (position === 'absolute' || position === 'fixed') {"," val = node[get]();"," node[set](val);"," } else {"," val = 0;"," }"," }",""," return val;"," },",""," destructor: function() {"," delete Y.Anim._instances[Y.stamp(this)];"," }"," };",""," Y.extend(Y.Anim, Y.Base, proto);","","","}, '@VERSION@', {\"requires\": [\"base-base\", \"node-style\"]});"];
-_yuitest_coverage["build/anim-base/anim-base.js"].lines = {"1":0,"23":0,"57":0,"60":0,"61":0,"62":0,"65":0,"67":0,"75":0,"83":0,"85":0,"86":0,"96":0,"104":0,"107":0,"112":0,"120":0,"121":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"134":0,"135":0,"136":0,"137":0,"147":0,"148":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"160":0,"161":0,"162":0,"163":0,"166":0,"169":0,"177":0,"178":0,"179":0,"183":0,"184":0,"186":0,"209":0,"210":0,"282":0,"354":0,"355":0,"356":0,"357":0,"358":0,"368":0,"369":0,"370":0,"371":0,"375":0,"383":0,"384":0,"385":0,"386":0,"389":0,"392":0,"393":0,"394":0,"398":0,"399":0,"400":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"418":0,"419":0,"423":0,"425":0,"432":0,"433":0,"434":0,"435":0,"437":0,"448":0,"449":0,"451":0,"461":0,"462":0,"464":0,"470":0,"471":0,"472":0,"473":0,"475":0,"476":0,"478":0,"482":0,"483":0,"484":0,"492":0,"496":0,"497":0,"498":0,"499":0,"507":0,"511":0,"512":0,"513":0,"516":0,"517":0,"518":0,"520":0,"521":0,"525":0,"532":0,"533":0,"534":0,"536":0,"537":0,"538":0,"543":0,"552":0,"553":0,"556":0,"557":0,"558":0,"561":0,"562":0,"563":0,"564":0,"567":0,"568":0,"570":0,"579":0,"582":0,"583":0,"584":0,"585":0,"593":0,"595":0,"596":0,"599":0,"600":0,"604":0,"614":0,"615":0,"616":0,"619":0,"620":0,"621":0,"623":0,"624":0,"627":0,"628":0,"630":0,"631":0,"632":0,"634":0,"635":0,"638":0,"639":0,"640":0,"643":0,"651":0,"657":0,"662":0,"663":0,"664":0,"665":0,"666":0,"668":0,"672":0,"676":0,"680":0};
-_yuitest_coverage["build/anim-base/anim-base.js"].functions = {"Anim:60":0,"DEFAULT_EASING:85":0,"get:106":0,"DEFAULT_SETTER:120":0,"DEFAULT_GETTER:147":0,"setter:176":0,"setter:208":0,"getter:281":0,"run:354":0,"pause:368":0,"stop:383":0,"_startTimer:392":0,"_stopTimer:398":0,"_runFrame:409":0,"run:431":0,"pause:447":0,"stop:460":0,"_start:469":0,"_pause:481":0,"_resume:495":0,"_end:510":0,"_runFrame:524":0,"_runAttrs:542":0,"_lastFrame:578":0,"(anonymous 2):614":0,"_initAnimAttr:603":0,"_getOffset:656":0,"destructor:675":0,"(anonymous 1):1":0};
-_yuitest_coverage["build/anim-base/anim-base.js"].coveredLines = 181;
+_yuitest_coverage["build/anim-base/anim-base.js"].code=["YUI.add('anim-base', function (Y, NAME) {","","/**","* The Animation Utility provides an API for creating advanced transitions.","* @module anim","*/","","/**","* Provides the base Anim class, for animating numeric properties.","*","* @module anim","* @submodule anim-base","*/",""," /**"," * A class for constructing animation instances."," * @class Anim"," * @for Anim"," * @constructor"," * @extends Base"," */",""," var RUNNING = 'running',"," START_TIME = 'startTime',"," ELAPSED_TIME = 'elapsedTime',"," /**"," * @for Anim"," * @event start"," * @description fires when an animation begins."," * @param {Event} ev The start event."," * @type Event.Custom"," */"," START = 'start',",""," /**"," * @event tween"," * @description fires every frame of the animation."," * @param {Event} ev The tween event."," * @type Event.Custom"," */"," TWEEN = 'tween',",""," /**"," * @event end"," * @description fires after the animation completes."," * @param {Event} ev The end event."," * @type Event.Custom"," */"," END = 'end',"," NODE = 'node',"," PAUSED = 'paused',"," REVERSE = 'reverse', // TODO: cleanup"," ITERATION_COUNT = 'iterationCount',",""," NUM = Number;",""," var _running = {},"," _timer;",""," Y.Anim = function() {"," Y.Anim.superclass.constructor.apply(this, arguments);"," Y.Anim._instances[Y.stamp(this)] = this;"," };",""," Y.Anim.NAME = 'anim';",""," Y.Anim._instances = {};",""," /**"," * Regex of properties that should use the default unit."," *"," * @property RE_DEFAULT_UNIT"," * @static"," */"," Y.Anim.RE_DEFAULT_UNIT = /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;",""," /**"," * The default unit to use with properties that pass the RE_DEFAULT_UNIT test."," *"," * @property DEFAULT_UNIT"," * @static"," */"," Y.Anim.DEFAULT_UNIT = 'px';",""," Y.Anim.DEFAULT_EASING = function (t, b, c, d) {"," return c * t / d + b; // linear easing"," };",""," /**"," * Time in milliseconds passed to setInterval for frame processing"," *"," * @property intervalTime"," * @default 20"," * @static"," */"," Y.Anim._intervalTime = 20;",""," /**"," * Bucket for custom getters and setters"," *"," * @property behaviors"," * @static"," */"," Y.Anim.behaviors = {"," left: {"," get: function(anim, attr) {"," return anim._getOffset(attr);"," }"," }"," };",""," Y.Anim.behaviors.top = Y.Anim.behaviors.left;",""," /**"," * The default setter to use when setting object properties."," *"," * @property DEFAULT_SETTER"," * @static"," */"," Y.Anim.DEFAULT_SETTER = function(anim, att, from, to, elapsed, duration, fn, unit) {"," var node = anim._node,"," domNode = node._node,"," val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);",""," if (domNode) {"," if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {"," unit = unit || '';"," node.setStyle(att, val + unit);"," } else if ('attributes' in domNode && att in domNode.attributes) {"," node.setAttribute(att, val);"," } else if (att in domNode) {"," domNode[att] = val;"," }"," } else if (node.set) {"," node.set(att, val);"," } else if (att in node) {"," node[att] = val;"," }"," };",""," /**"," * The default getter to use when getting object properties."," *"," * @property DEFAULT_GETTER"," * @static"," */"," Y.Anim.DEFAULT_GETTER = function(anim, att) {"," var node = anim._node,"," domNode = node._node,"," val = '';",""," if (domNode) {"," if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {"," val = node.getComputedStyle(att);"," } else if ('attributes' in domNode && att in domNode.attributes) {"," val = node.getAttribute(att);"," } else if (att in domNode) {"," val = domNode[att];"," }"," } else if (node.get) {"," val = node.get(att);"," } else if (att in node) {"," val = node[att];"," }",""," return val;"," };",""," Y.Anim.ATTRS = {"," /**"," * The object to be animated."," * @attribute node"," * @type Node"," */"," node: {"," setter: function(node) {"," if (node) {"," if (typeof node === 'string' || node.nodeType) {"," node = Y.one(node);"," }"," }",""," this._node = node;"," if (!node) {"," }"," return node;"," }"," },",""," /**"," * The length of the animation. Defaults to \"1\" (second)."," * @attribute duration"," * @type NUM"," */"," duration: {"," value: 1"," },",""," /**"," * The method that will provide values to the attribute(s) during the animation."," * Defaults to \"Easing.easeNone\"."," * @attribute easing"," * @type Function"," */"," easing: {"," value: Y.Anim.DEFAULT_EASING,",""," setter: function(val) {"," if (typeof val === 'string' && Y.Easing) {"," return Y.Easing[val];"," }"," }"," },",""," /**"," * The starting values for the animated properties."," *"," * Fields may be strings, numbers, or functions."," * If a function is used, the return value becomes the from value."," * If no from value is specified, the DEFAULT_GETTER will be used."," * Supports any unit, provided it matches the \"to\" (or default)"," * unit (e.g. `{width: '10em', color: 'rgb(0, 0, 0)', borderColor: '#ccc'}`)."," *"," * If using the default ('px' for length-based units), the unit may be omitted"," * (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels"," * and hex, respectively)."," *"," * @attribute from"," * @type Object"," */"," from: {},",""," /**"," * The ending values for the animated properties."," *"," * Fields may be strings, numbers, or functions."," * Supports any unit, provided it matches the \"from\" (or default)"," * unit (e.g. `{width: '50%', color: 'red', borderColor: '#ccc'}`)."," *"," * If using the default ('px' for length-based units), the unit may be omitted"," * (e.g. `{width: 100, borderColor: 'ccc'}`, which defaults to pixels"," * and hex, respectively)."," *"," * @attribute to"," * @type Object"," */"," to: {},",""," /**"," * Date stamp for the first frame of the animation."," * @attribute startTime"," * @type Int"," * @default 0"," * @readOnly"," */"," startTime: {"," value: 0,"," readOnly: true"," },",""," /**"," * Current time the animation has been running."," * @attribute elapsedTime"," * @type Int"," * @default 0"," * @readOnly"," */"," elapsedTime: {"," value: 0,"," readOnly: true"," },",""," /**"," * Whether or not the animation is currently running."," * @attribute running"," * @type Boolean"," * @default false"," * @readOnly"," */"," running: {"," getter: function() {"," return !!_running[Y.stamp(this)];"," },"," value: false,"," readOnly: true"," },",""," /**"," * The number of times the animation should run"," * @attribute iterations"," * @type Int"," * @default 1"," */"," iterations: {"," value: 1"," },",""," /**"," * The number of iterations that have occurred."," * Resets when an animation ends (reaches iteration count or stop() called)."," * @attribute iterationCount"," * @type Int"," * @default 0"," * @readOnly"," */"," iterationCount: {"," value: 0,"," readOnly: true"," },",""," /**"," * How iterations of the animation should behave."," * Possible values are \"normal\" and \"alternate\"."," * Normal will repeat the animation, alternate will reverse on every other pass."," *"," * @attribute direction"," * @type String"," * @default \"normal\""," */"," direction: {"," value: 'normal' // | alternate (fwd on odd, rev on even per spec)"," },",""," /**"," * Whether or not the animation is currently paused."," * @attribute paused"," * @type Boolean"," * @default false"," * @readOnly"," */"," paused: {"," readOnly: true,"," value: false"," },",""," /**"," * If true, animation begins from last frame"," * @attribute reverse"," * @type Boolean"," * @default false"," */"," reverse: {"," value: false"," }","",""," };",""," /**"," * Runs all animation instances."," * @method run"," * @static"," */"," Y.Anim.run = function() {"," var instances = Y.Anim._instances,"," i;"," for (i in instances) {"," if (instances[i].run) {"," instances[i].run();"," }"," }"," };",""," /**"," * Pauses all animation instances."," * @method pause"," * @static"," */"," Y.Anim.pause = function() {"," for (var i in _running) { // stop timer if nothing running"," if (_running[i].pause) {"," _running[i].pause();"," }"," }",""," Y.Anim._stopTimer();"," };",""," /**"," * Stops all animation instances."," * @method stop"," * @static"," */"," Y.Anim.stop = function() {"," for (var i in _running) { // stop timer if nothing running"," if (_running[i].stop) {"," _running[i].stop();"," }"," }"," Y.Anim._stopTimer();"," };",""," Y.Anim._startTimer = function() {"," if (!_timer) {"," _timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);"," }"," };",""," Y.Anim._stopTimer = function() {"," clearInterval(_timer);"," _timer = 0;"," };",""," /**"," * Called per Interval to handle each animation frame."," * @method _runFrame"," * @private"," * @static"," */"," Y.Anim._runFrame = function() {"," var done = true,"," anim;"," for (anim in _running) {"," if (_running[anim]._runFrame) {"," done = false;"," _running[anim]._runFrame();"," }"," }",""," if (done) {"," Y.Anim._stopTimer();"," }"," };",""," Y.Anim.RE_UNITS = /^(-?\\d*\\.?\\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;",""," var proto = {"," /**"," * Starts or resumes an animation."," * @method run"," * @chainable"," */"," run: function() {"," if (this.get(PAUSED)) {"," this._resume();"," } else if (!this.get(RUNNING)) {"," this._start();"," }"," return this;"," },",""," /**"," * Pauses the animation and"," * freezes it in its current state and time."," * Calling run() will continue where it left off."," * @method pause"," * @chainable"," */"," pause: function() {"," if (this.get(RUNNING)) {"," this._pause();"," }"," return this;"," },",""," /**"," * Stops the animation and resets its time."," * @method stop"," * @param {Boolean} finish If true, the animation will move to the last frame"," * @chainable"," */"," stop: function(finish) {"," if (this.get(RUNNING) || this.get(PAUSED)) {"," this._end(finish);"," }"," return this;"," },",""," _added: false,",""," _start: function() {"," this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));"," this._actualFrames = 0;"," if (!this.get(PAUSED)) {"," this._initAnimAttr();"," }"," _running[Y.stamp(this)] = this;"," Y.Anim._startTimer();",""," this.fire(START);"," },",""," _pause: function() {"," this._set(START_TIME, null);"," this._set(PAUSED, true);"," delete _running[Y.stamp(this)];",""," /**"," * @event pause"," * @description fires when an animation is paused."," * @param {Event} ev The pause event."," * @type Event.Custom"," */"," this.fire('pause');"," },",""," _resume: function() {"," this._set(PAUSED, false);"," _running[Y.stamp(this)] = this;"," this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));"," Y.Anim._startTimer();",""," /**"," * @event resume"," * @description fires when an animation is resumed (run from pause)."," * @param {Event} ev The pause event."," * @type Event.Custom"," */"," this.fire('resume');"," },",""," _end: function(finish) {"," var duration = this.get('duration') * 1000;"," if (finish) { // jump to last frame"," this._runAttrs(duration, duration, this.get(REVERSE));"," }",""," this._set(START_TIME, null);"," this._set(ELAPSED_TIME, 0);"," this._set(PAUSED, false);",""," delete _running[Y.stamp(this)];"," this.fire(END, {elapsed: this.get(ELAPSED_TIME)});"," },",""," _runFrame: function() {"," var d = this._runtimeAttr.duration,"," t = new Date() - this.get(START_TIME),"," reverse = this.get(REVERSE),"," done = (t >= d);",""," this._runAttrs(t, d, reverse);"," this._actualFrames += 1;"," this._set(ELAPSED_TIME, t);",""," this.fire(TWEEN);"," if (done) {"," this._lastFrame();"," }"," },",""," _runAttrs: function(t, d, reverse) {"," var attr = this._runtimeAttr,"," customAttr = Y.Anim.behaviors,"," easing = attr.easing,"," lastFrame = d,"," done = false,"," attribute,"," setter,"," i;",""," if (t >= d) {"," done = true;"," }",""," if (reverse) {"," t = d - t;"," lastFrame = 0;"," }",""," for (i in attr) {"," if (attr[i].to) {"," attribute = attr[i];"," setter = (i in customAttr && 'set' in customAttr[i]) ?"," customAttr[i].set : Y.Anim.DEFAULT_SETTER;",""," if (!done) {"," setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);"," } else {"," setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);"," }"," }"," }","",""," },",""," _lastFrame: function() {"," var iter = this.get('iterations'),"," iterCount = this.get(ITERATION_COUNT);",""," iterCount += 1;"," if (iter === 'infinite' || iterCount < iter) {"," if (this.get('direction') === 'alternate') {"," this.set(REVERSE, !this.get(REVERSE)); // flip it"," }"," /**"," * @event iteration"," * @description fires when an animation begins an iteration."," * @param {Event} ev The iteration event."," * @type Event.Custom"," */"," this.fire('iteration');"," } else {"," iterCount = 0;"," this._end();"," }",""," this._set(START_TIME, new Date());"," this._set(ITERATION_COUNT, iterCount);"," },",""," _initAnimAttr: function() {"," var from = this.get('from') || {},"," to = this.get('to') || {},"," attr = {"," duration: this.get('duration') * 1000,"," easing: this.get('easing')"," },"," customAttr = Y.Anim.behaviors,"," node = this.get(NODE), // implicit attr init"," unit, begin, end;",""," Y.each(to, function(val, name) {"," if (typeof val === 'function') {"," val = val.call(this, node);"," }",""," begin = from[name];"," if (begin === undefined) {"," begin = (name in customAttr && 'get' in customAttr[name]) ?"," customAttr[name].get(this, name) : Y.Anim.DEFAULT_GETTER(this, name);"," } else if (typeof begin === 'function') {"," begin = begin.call(this, node);"," }",""," var mFrom = Y.Anim.RE_UNITS.exec(begin),"," mTo = Y.Anim.RE_UNITS.exec(val);",""," begin = mFrom ? mFrom[1] : begin;"," end = mTo ? mTo[1] : val;"," unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units",""," if (!unit && Y.Anim.RE_DEFAULT_UNIT.test(name)) {"," unit = Y.Anim.DEFAULT_UNIT;"," }",""," if (!begin || !end) {"," Y.error('invalid \"from\" or \"to\" for \"' + name + '\"', 'Anim');"," return;"," }",""," attr[name] = {"," from: Y.Lang.isObject(begin) ? Y.clone(begin) : begin,"," to: end,"," unit: unit"," };",""," }, this);",""," this._runtimeAttr = attr;"," },","",""," // TODO: move to computedStyle? (browsers dont agree on default computed offsets)"," _getOffset: function(attr) {"," var node = this._node,"," val = node.getComputedStyle(attr),"," get = (attr === 'left') ? 'getX': 'getY',"," set = (attr === 'left') ? 'setX': 'setY',"," position;",""," if (val === 'auto') {"," position = node.getStyle('position');"," if (position === 'absolute' || position === 'fixed') {"," val = node[get]();"," node[set](val);"," } else {"," val = 0;"," }"," }",""," return val;"," },",""," destructor: function() {"," delete Y.Anim._instances[Y.stamp(this)];"," }"," };",""," Y.extend(Y.Anim, Y.Base, proto);","","","}, '@VERSION@', {\"requires\": [\"base-base\", \"node-style\"]});"];
+_yuitest_coverage["build/anim-base/anim-base.js"].lines = {"1":0,"23":0,"57":0,"60":0,"61":0,"62":0,"65":0,"67":0,"75":0,"83":0,"85":0,"86":0,"96":0,"104":0,"107":0,"112":0,"120":0,"121":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"134":0,"135":0,"136":0,"137":0,"147":0,"148":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"160":0,"161":0,"162":0,"163":0,"166":0,"169":0,"177":0,"178":0,"179":0,"183":0,"184":0,"186":0,"209":0,"210":0,"282":0,"354":0,"355":0,"357":0,"358":0,"359":0,"369":0,"370":0,"371":0,"372":0,"376":0,"384":0,"385":0,"386":0,"387":0,"390":0,"393":0,"394":0,"395":0,"399":0,"400":0,"401":0,"410":0,"411":0,"413":0,"414":0,"415":0,"416":0,"420":0,"421":0,"425":0,"427":0,"434":0,"435":0,"436":0,"437":0,"439":0,"450":0,"451":0,"453":0,"463":0,"464":0,"466":0,"472":0,"473":0,"474":0,"475":0,"477":0,"478":0,"480":0,"484":0,"485":0,"486":0,"494":0,"498":0,"499":0,"500":0,"501":0,"509":0,"513":0,"514":0,"515":0,"518":0,"519":0,"520":0,"522":0,"523":0,"527":0,"532":0,"533":0,"534":0,"536":0,"537":0,"538":0,"543":0,"552":0,"553":0,"556":0,"557":0,"558":0,"561":0,"562":0,"563":0,"564":0,"567":0,"568":0,"570":0,"579":0,"582":0,"583":0,"584":0,"585":0,"593":0,"595":0,"596":0,"599":0,"600":0,"604":0,"614":0,"615":0,"616":0,"619":0,"620":0,"621":0,"623":0,"624":0,"627":0,"630":0,"631":0,"632":0,"634":0,"635":0,"638":0,"639":0,"640":0,"643":0,"651":0,"657":0,"663":0,"664":0,"665":0,"666":0,"667":0,"669":0,"673":0,"677":0,"681":0};
+_yuitest_coverage["build/anim-base/anim-base.js"].functions = {"Anim:60":0,"DEFAULT_EASING:85":0,"get:106":0,"DEFAULT_SETTER:120":0,"DEFAULT_GETTER:147":0,"setter:176":0,"setter:208":0,"getter:281":0,"run:354":0,"pause:369":0,"stop:384":0,"_startTimer:393":0,"_stopTimer:399":0,"_runFrame:410":0,"run:433":0,"pause:449":0,"stop:462":0,"_start:471":0,"_pause:483":0,"_resume:497":0,"_end:512":0,"_runFrame:526":0,"_runAttrs:542":0,"_lastFrame:578":0,"(anonymous 2):614":0,"_initAnimAttr:603":0,"_getOffset:656":0,"destructor:676":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/anim-base/anim-base.js"].coveredLines = 180;
_yuitest_coverage["build/anim-base/anim-base.js"].coveredFunctions = 29;
_yuitest_coverline("build/anim-base/anim-base.js", 1);
YUI.add('anim-base', function (Y, NAME) {
@@ -135,7 +135,7 @@ return c * t / d + b; // linear easing
};
/**
- * Time in milliseconds passed to setInterval for frame processing
+ * Time in milliseconds passed to setInterval for frame processing
*
* @property intervalTime
* @default 20
@@ -262,7 +262,7 @@ Y.Anim.ATTRS = {
_yuitest_coverline("build/anim-base/anim-base.js", 177);
if (node) {
_yuitest_coverline("build/anim-base/anim-base.js", 178);
-if (typeof node == 'string' || node.nodeType) {
+if (typeof node === 'string' || node.nodeType) {
_yuitest_coverline("build/anim-base/anim-base.js", 179);
node = Y.one(node);
}
@@ -288,7 +288,7 @@ return node;
},
/**
- * The method that will provide values to the attribute(s) during the animation.
+ * The method that will provide values to the attribute(s) during the animation.
* Defaults to "Easing.easeNone".
* @attribute easing
* @type Function
@@ -344,7 +344,7 @@ return Y.Easing[val];
* Date stamp for the first frame of the animation.
* @attribute startTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
startTime: {
@@ -356,7 +356,7 @@ return Y.Easing[val];
* Current time the animation has been running.
* @attribute elapsedTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
elapsedTime: {
@@ -366,9 +366,9 @@ return Y.Easing[val];
/**
* Whether or not the animation is currently running.
- * @attribute running
+ * @attribute running
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
running: {
@@ -382,18 +382,18 @@ return !!_running[Y.stamp(this)];
},
/**
- * The number of times the animation should run
+ * The number of times the animation should run
* @attribute iterations
* @type Int
- * @default 1
+ * @default 1
*/
iterations: {
value: 1
},
/**
* The number of iterations that have occurred.
- * Resets when an animation ends (reaches iteration count or stop() called).
+ * Resets when an animation ends (reaches iteration count or stop() called).
* @attribute iterationCount
* @type Int
* @default 0
@@ -405,7 +405,7 @@ return !!_running[Y.stamp(this)];
},
/**
- * How iterations of the animation should behave.
+ * How iterations of the animation should behave.
* Possible values are "normal" and "alternate".
* Normal will repeat the animation, alternate will reverse on every other pass.
*
@@ -419,9 +419,9 @@ return !!_running[Y.stamp(this)];
/**
* Whether or not the animation is currently paused.
- * @attribute paused
+ * @attribute paused
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
paused: {
@@ -433,7 +433,7 @@ return !!_running[Y.stamp(this)];
* If true, animation begins from last frame
* @attribute reverse
* @type Boolean
- * @default false
+ * @default false
*/
reverse: {
value: false
@@ -446,17 +446,18 @@ return !!_running[Y.stamp(this)];
* Runs all animation instances.
* @method run
* @static
- */
+ */
_yuitest_coverline("build/anim-base/anim-base.js", 354);
Y.Anim.run = function() {
_yuitest_coverfunc("build/anim-base/anim-base.js", "run", 354);
_yuitest_coverline("build/anim-base/anim-base.js", 355);
-var instances = Y.Anim._instances;
- _yuitest_coverline("build/anim-base/anim-base.js", 356);
-for (var i in instances) {
- _yuitest_coverline("build/anim-base/anim-base.js", 357);
+var instances = Y.Anim._instances,
+ i;
+ _yuitest_coverline("build/anim-base/anim-base.js", 357);
+for (i in instances) {
+ _yuitest_coverline("build/anim-base/anim-base.js", 358);
if (instances[i].run) {
- _yuitest_coverline("build/anim-base/anim-base.js", 358);
+ _yuitest_coverline("build/anim-base/anim-base.js", 359);
instances[i].run();
}
}
@@ -466,59 +467,59 @@ instances[i].run();
* Pauses all animation instances.
* @method pause
* @static
- */
- _yuitest_coverline("build/anim-base/anim-base.js", 368);
+ */
+ _yuitest_coverline("build/anim-base/anim-base.js", 369);
Y.Anim.pause = function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "pause", 368);
-_yuitest_coverline("build/anim-base/anim-base.js", 369);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "pause", 369);
+_yuitest_coverline("build/anim-base/anim-base.js", 370);
for (var i in _running) { // stop timer if nothing running
- _yuitest_coverline("build/anim-base/anim-base.js", 370);
+ _yuitest_coverline("build/anim-base/anim-base.js", 371);
if (_running[i].pause) {
- _yuitest_coverline("build/anim-base/anim-base.js", 371);
+ _yuitest_coverline("build/anim-base/anim-base.js", 372);
_running[i].pause();
}
}
- _yuitest_coverline("build/anim-base/anim-base.js", 375);
+ _yuitest_coverline("build/anim-base/anim-base.js", 376);
Y.Anim._stopTimer();
};
/**
* Stops all animation instances.
* @method stop
* @static
- */
- _yuitest_coverline("build/anim-base/anim-base.js", 383);
+ */
+ _yuitest_coverline("build/anim-base/anim-base.js", 384);
Y.Anim.stop = function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "stop", 383);
-_yuitest_coverline("build/anim-base/anim-base.js", 384);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "stop", 384);
+_yuitest_coverline("build/anim-base/anim-base.js", 385);
for (var i in _running) { // stop timer if nothing running
- _yuitest_coverline("build/anim-base/anim-base.js", 385);
+ _yuitest_coverline("build/anim-base/anim-base.js", 386);
if (_running[i].stop) {
- _yuitest_coverline("build/anim-base/anim-base.js", 386);
+ _yuitest_coverline("build/anim-base/anim-base.js", 387);
_running[i].stop();
}
}
- _yuitest_coverline("build/anim-base/anim-base.js", 389);
+ _yuitest_coverline("build/anim-base/anim-base.js", 390);
Y.Anim._stopTimer();
};
-
- _yuitest_coverline("build/anim-base/anim-base.js", 392);
+
+ _yuitest_coverline("build/anim-base/anim-base.js", 393);
Y.Anim._startTimer = function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_startTimer", 392);
-_yuitest_coverline("build/anim-base/anim-base.js", 393);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_startTimer", 393);
+_yuitest_coverline("build/anim-base/anim-base.js", 394);
if (!_timer) {
- _yuitest_coverline("build/anim-base/anim-base.js", 394);
+ _yuitest_coverline("build/anim-base/anim-base.js", 395);
_timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);
}
};
- _yuitest_coverline("build/anim-base/anim-base.js", 398);
+ _yuitest_coverline("build/anim-base/anim-base.js", 399);
Y.Anim._stopTimer = function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_stopTimer", 398);
-_yuitest_coverline("build/anim-base/anim-base.js", 399);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_stopTimer", 399);
+_yuitest_coverline("build/anim-base/anim-base.js", 400);
clearInterval(_timer);
- _yuitest_coverline("build/anim-base/anim-base.js", 400);
+ _yuitest_coverline("build/anim-base/anim-base.js", 401);
_timer = 0;
};
@@ -527,52 +528,53 @@ _timer = 0;
* @method _runFrame
* @private
* @static
- */
- _yuitest_coverline("build/anim-base/anim-base.js", 409);
+ */
+ _yuitest_coverline("build/anim-base/anim-base.js", 410);
Y.Anim._runFrame = function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_runFrame", 409);
-_yuitest_coverline("build/anim-base/anim-base.js", 410);
-var done = true;
- _yuitest_coverline("build/anim-base/anim-base.js", 411);
-for (var anim in _running) {
- _yuitest_coverline("build/anim-base/anim-base.js", 412);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_runFrame", 410);
+_yuitest_coverline("build/anim-base/anim-base.js", 411);
+var done = true,
+ anim;
+ _yuitest_coverline("build/anim-base/anim-base.js", 413);
+for (anim in _running) {
+ _yuitest_coverline("build/anim-base/anim-base.js", 414);
if (_running[anim]._runFrame) {
- _yuitest_coverline("build/anim-base/anim-base.js", 413);
+ _yuitest_coverline("build/anim-base/anim-base.js", 415);
done = false;
- _yuitest_coverline("build/anim-base/anim-base.js", 414);
+ _yuitest_coverline("build/anim-base/anim-base.js", 416);
_running[anim]._runFrame();
}
}
- _yuitest_coverline("build/anim-base/anim-base.js", 418);
+ _yuitest_coverline("build/anim-base/anim-base.js", 420);
if (done) {
- _yuitest_coverline("build/anim-base/anim-base.js", 419);
+ _yuitest_coverline("build/anim-base/anim-base.js", 421);
Y.Anim._stopTimer();
}
};
- _yuitest_coverline("build/anim-base/anim-base.js", 423);
+ _yuitest_coverline("build/anim-base/anim-base.js", 425);
Y.Anim.RE_UNITS = /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;
- _yuitest_coverline("build/anim-base/anim-base.js", 425);
+ _yuitest_coverline("build/anim-base/anim-base.js", 427);
var proto = {
/**
* Starts or resumes an animation.
* @method run
* @chainable
- */
+ */
run: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "run", 431);
-_yuitest_coverline("build/anim-base/anim-base.js", 432);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "run", 433);
+_yuitest_coverline("build/anim-base/anim-base.js", 434);
if (this.get(PAUSED)) {
- _yuitest_coverline("build/anim-base/anim-base.js", 433);
+ _yuitest_coverline("build/anim-base/anim-base.js", 435);
this._resume();
- } else {_yuitest_coverline("build/anim-base/anim-base.js", 434);
+ } else {_yuitest_coverline("build/anim-base/anim-base.js", 436);
if (!this.get(RUNNING)) {
- _yuitest_coverline("build/anim-base/anim-base.js", 435);
+ _yuitest_coverline("build/anim-base/anim-base.js", 437);
this._start();
}}
- _yuitest_coverline("build/anim-base/anim-base.js", 437);
+ _yuitest_coverline("build/anim-base/anim-base.js", 439);
return this;
},
@@ -582,15 +584,15 @@ return this;
* Calling run() will continue where it left off.
* @method pause
* @chainable
- */
+ */
pause: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "pause", 447);
-_yuitest_coverline("build/anim-base/anim-base.js", 448);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "pause", 449);
+_yuitest_coverline("build/anim-base/anim-base.js", 450);
if (this.get(RUNNING)) {
- _yuitest_coverline("build/anim-base/anim-base.js", 449);
+ _yuitest_coverline("build/anim-base/anim-base.js", 451);
this._pause();
}
- _yuitest_coverline("build/anim-base/anim-base.js", 451);
+ _yuitest_coverline("build/anim-base/anim-base.js", 453);
return this;
},
@@ -599,47 +601,47 @@ return this;
* @method stop
* @param {Boolean} finish If true, the animation will move to the last frame
* @chainable
- */
+ */
stop: function(finish) {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "stop", 460);
-_yuitest_coverline("build/anim-base/anim-base.js", 461);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "stop", 462);
+_yuitest_coverline("build/anim-base/anim-base.js", 463);
if (this.get(RUNNING) || this.get(PAUSED)) {
- _yuitest_coverline("build/anim-base/anim-base.js", 462);
+ _yuitest_coverline("build/anim-base/anim-base.js", 464);
this._end(finish);
}
- _yuitest_coverline("build/anim-base/anim-base.js", 464);
+ _yuitest_coverline("build/anim-base/anim-base.js", 466);
return this;
},
_added: false,
_start: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_start", 469);
-_yuitest_coverline("build/anim-base/anim-base.js", 470);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_start", 471);
+_yuitest_coverline("build/anim-base/anim-base.js", 472);
this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- _yuitest_coverline("build/anim-base/anim-base.js", 471);
+ _yuitest_coverline("build/anim-base/anim-base.js", 473);
this._actualFrames = 0;
- _yuitest_coverline("build/anim-base/anim-base.js", 472);
+ _yuitest_coverline("build/anim-base/anim-base.js", 474);
if (!this.get(PAUSED)) {
- _yuitest_coverline("build/anim-base/anim-base.js", 473);
+ _yuitest_coverline("build/anim-base/anim-base.js", 475);
this._initAnimAttr();
}
- _yuitest_coverline("build/anim-base/anim-base.js", 475);
+ _yuitest_coverline("build/anim-base/anim-base.js", 477);
_running[Y.stamp(this)] = this;
- _yuitest_coverline("build/anim-base/anim-base.js", 476);
+ _yuitest_coverline("build/anim-base/anim-base.js", 478);
Y.Anim._startTimer();
- _yuitest_coverline("build/anim-base/anim-base.js", 478);
+ _yuitest_coverline("build/anim-base/anim-base.js", 480);
this.fire(START);
},
_pause: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_pause", 481);
-_yuitest_coverline("build/anim-base/anim-base.js", 482);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_pause", 483);
+_yuitest_coverline("build/anim-base/anim-base.js", 484);
this._set(START_TIME, null);
- _yuitest_coverline("build/anim-base/anim-base.js", 483);
+ _yuitest_coverline("build/anim-base/anim-base.js", 485);
this._set(PAUSED, true);
- _yuitest_coverline("build/anim-base/anim-base.js", 484);
+ _yuitest_coverline("build/anim-base/anim-base.js", 486);
delete _running[Y.stamp(this)];
/**
@@ -648,19 +650,19 @@ delete _running[Y.stamp(this)];
* @param {Event} ev The pause event.
* @type Event.Custom
*/
- _yuitest_coverline("build/anim-base/anim-base.js", 492);
+ _yuitest_coverline("build/anim-base/anim-base.js", 494);
this.fire('pause');
},
_resume: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_resume", 495);
-_yuitest_coverline("build/anim-base/anim-base.js", 496);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_resume", 497);
+_yuitest_coverline("build/anim-base/anim-base.js", 498);
this._set(PAUSED, false);
- _yuitest_coverline("build/anim-base/anim-base.js", 497);
+ _yuitest_coverline("build/anim-base/anim-base.js", 499);
_running[Y.stamp(this)] = this;
- _yuitest_coverline("build/anim-base/anim-base.js", 498);
+ _yuitest_coverline("build/anim-base/anim-base.js", 500);
this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- _yuitest_coverline("build/anim-base/anim-base.js", 499);
+ _yuitest_coverline("build/anim-base/anim-base.js", 501);
Y.Anim._startTimer();
/**
@@ -669,43 +671,41 @@ Y.Anim._startTimer();
* @param {Event} ev The pause event.
* @type Event.Custom
*/
- _yuitest_coverline("build/anim-base/anim-base.js", 507);
+ _yuitest_coverline("build/anim-base/anim-base.js", 509);
this.fire('resume');
},
_end: function(finish) {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_end", 510);
-_yuitest_coverline("build/anim-base/anim-base.js", 511);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_end", 512);
+_yuitest_coverline("build/anim-base/anim-base.js", 513);
var duration = this.get('duration') * 1000;
- _yuitest_coverline("build/anim-base/anim-base.js", 512);
+ _yuitest_coverline("build/anim-base/anim-base.js", 514);
if (finish) { // jump to last frame
- _yuitest_coverline("build/anim-base/anim-base.js", 513);
+ _yuitest_coverline("build/anim-base/anim-base.js", 515);
this._runAttrs(duration, duration, this.get(REVERSE));
}
- _yuitest_coverline("build/anim-base/anim-base.js", 516);
+ _yuitest_coverline("build/anim-base/anim-base.js", 518);
this._set(START_TIME, null);
- _yuitest_coverline("build/anim-base/anim-base.js", 517);
+ _yuitest_coverline("build/anim-base/anim-base.js", 519);
this._set(ELAPSED_TIME, 0);
- _yuitest_coverline("build/anim-base/anim-base.js", 518);
+ _yuitest_coverline("build/anim-base/anim-base.js", 520);
this._set(PAUSED, false);
- _yuitest_coverline("build/anim-base/anim-base.js", 520);
+ _yuitest_coverline("build/anim-base/anim-base.js", 522);
delete _running[Y.stamp(this)];
- _yuitest_coverline("build/anim-base/anim-base.js", 521);
+ _yuitest_coverline("build/anim-base/anim-base.js", 523);
this.fire(END, {elapsed: this.get(ELAPSED_TIME)});
},
_runFrame: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "_runFrame", 524);
-_yuitest_coverline("build/anim-base/anim-base.js", 525);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "_runFrame", 526);
+_yuitest_coverline("build/anim-base/anim-base.js", 527);
var d = this._runtimeAttr.duration,
t = new Date() - this.get(START_TIME),
reverse = this.get(REVERSE),
- done = (t >= d),
- attribute,
- setter;
-
+ done = (t >= d);
+
_yuitest_coverline("build/anim-base/anim-base.js", 532);
this._runAttrs(t, d, reverse);
_yuitest_coverline("build/anim-base/anim-base.js", 533);
@@ -761,10 +761,10 @@ setter = (i in customAttr && 'set' in customAttr[i]) ?
_yuitest_coverline("build/anim-base/anim-base.js", 567);
if (!done) {
_yuitest_coverline("build/anim-base/anim-base.js", 568);
-setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
+setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
} else {
_yuitest_coverline("build/anim-base/anim-base.js", 570);
-setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
+setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
}
}
}
@@ -844,9 +844,8 @@ begin = begin.call(this, node);
}}
_yuitest_coverline("build/anim-base/anim-base.js", 627);
-var mFrom = Y.Anim.RE_UNITS.exec(begin);
- _yuitest_coverline("build/anim-base/anim-base.js", 628);
-var mTo = Y.Anim.RE_UNITS.exec(val);
+var mFrom = Y.Anim.RE_UNITS.exec(begin),
+ mTo = Y.Anim.RE_UNITS.exec(val);
_yuitest_coverline("build/anim-base/anim-base.js", 630);
begin = mFrom ? mFrom[1] : begin;
@@ -890,36 +889,37 @@ _yuitest_coverline("build/anim-base/anim-base.js", 657);
var node = this._node,
val = node.getComputedStyle(attr),
get = (attr === 'left') ? 'getX': 'getY',
- set = (attr === 'left') ? 'setX': 'setY';
+ set = (attr === 'left') ? 'setX': 'setY',
+ position;
- _yuitest_coverline("build/anim-base/anim-base.js", 662);
+ _yuitest_coverline("build/anim-base/anim-base.js", 663);
if (val === 'auto') {
- _yuitest_coverline("build/anim-base/anim-base.js", 663);
-var position = node.getStyle('position');
_yuitest_coverline("build/anim-base/anim-base.js", 664);
+position = node.getStyle('position');
+ _yuitest_coverline("build/anim-base/anim-base.js", 665);
if (position === 'absolute' || position === 'fixed') {
- _yuitest_coverline("build/anim-base/anim-base.js", 665);
-val = node[get]();
_yuitest_coverline("build/anim-base/anim-base.js", 666);
+val = node[get]();
+ _yuitest_coverline("build/anim-base/anim-base.js", 667);
node[set](val);
} else {
- _yuitest_coverline("build/anim-base/anim-base.js", 668);
+ _yuitest_coverline("build/anim-base/anim-base.js", 669);
val = 0;
}
}
- _yuitest_coverline("build/anim-base/anim-base.js", 672);
+ _yuitest_coverline("build/anim-base/anim-base.js", 673);
return val;
},
destructor: function() {
- _yuitest_coverfunc("build/anim-base/anim-base.js", "destructor", 675);
-_yuitest_coverline("build/anim-base/anim-base.js", 676);
+ _yuitest_coverfunc("build/anim-base/anim-base.js", "destructor", 676);
+_yuitest_coverline("build/anim-base/anim-base.js", 677);
delete Y.Anim._instances[Y.stamp(this)];
}
};
- _yuitest_coverline("build/anim-base/anim-base.js", 680);
+ _yuitest_coverline("build/anim-base/anim-base.js", 681);
Y.extend(Y.Anim, Y.Base, proto);
View
73 build/anim-base/anim-base-debug.js
@@ -87,7 +87,7 @@ YUI.add('anim-base', function (Y, NAME) {
};
/**
- * Time in milliseconds passed to setInterval for frame processing
+ * Time in milliseconds passed to setInterval for frame processing
*
* @property intervalTime
* @default 20
@@ -175,7 +175,7 @@ YUI.add('anim-base', function (Y, NAME) {
node: {
setter: function(node) {
if (node) {
- if (typeof node == 'string' || node.nodeType) {
+ if (typeof node === 'string' || node.nodeType) {
node = Y.one(node);
}
}
@@ -198,7 +198,7 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * The method that will provide values to the attribute(s) during the animation.
+ * The method that will provide values to the attribute(s) during the animation.
* Defaults to "Easing.easeNone".
* @attribute easing
* @type Function
@@ -251,7 +251,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Date stamp for the first frame of the animation.
* @attribute startTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
startTime: {
@@ -263,7 +263,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Current time the animation has been running.
* @attribute elapsedTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
elapsedTime: {
@@ -273,9 +273,9 @@ YUI.add('anim-base', function (Y, NAME) {
/**
* Whether or not the animation is currently running.
- * @attribute running
+ * @attribute running
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
running: {
@@ -287,18 +287,18 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * The number of times the animation should run
+ * The number of times the animation should run
* @attribute iterations
* @type Int
- * @default 1
+ * @default 1
*/
iterations: {
value: 1
},
/**
* The number of iterations that have occurred.
- * Resets when an animation ends (reaches iteration count or stop() called).
+ * Resets when an animation ends (reaches iteration count or stop() called).
* @attribute iterationCount
* @type Int
* @default 0
@@ -310,7 +310,7 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * How iterations of the animation should behave.
+ * How iterations of the animation should behave.
* Possible values are "normal" and "alternate".
* Normal will repeat the animation, alternate will reverse on every other pass.
*
@@ -324,9 +324,9 @@ YUI.add('anim-base', function (Y, NAME) {
/**
* Whether or not the animation is currently paused.
- * @attribute paused
+ * @attribute paused
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
paused: {
@@ -338,7 +338,7 @@ YUI.add('anim-base', function (Y, NAME) {
* If true, animation begins from last frame
* @attribute reverse
* @type Boolean
- * @default false
+ * @default false
*/
reverse: {
value: false
@@ -351,10 +351,11 @@ YUI.add('anim-base', function (Y, NAME) {
* Runs all animation instances.
* @method run
* @static
- */
+ */
Y.Anim.run = function() {
- var instances = Y.Anim._instances;
- for (var i in instances) {
+ var instances = Y.Anim._instances,
+ i;
+ for (i in instances) {
if (instances[i].run) {
instances[i].run();
}
@@ -365,7 +366,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Pauses all animation instances.
* @method pause
* @static
- */
+ */
Y.Anim.pause = function() {
for (var i in _running) { // stop timer if nothing running
if (_running[i].pause) {
@@ -380,7 +381,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Stops all animation instances.
* @method stop
* @static
- */
+ */
Y.Anim.stop = function() {
for (var i in _running) { // stop timer if nothing running
if (_running[i].stop) {
@@ -389,7 +390,7 @@ YUI.add('anim-base', function (Y, NAME) {
}
Y.Anim._stopTimer();
};
-
+
Y.Anim._startTimer = function() {
if (!_timer) {
_timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);
@@ -406,10 +407,11 @@ YUI.add('anim-base', function (Y, NAME) {
* @method _runFrame
* @private
* @static
- */
+ */
Y.Anim._runFrame = function() {
- var done = true;
- for (var anim in _running) {
+ var done = true,
+ anim;
+ for (anim in _running) {
if (_running[anim]._runFrame) {
done = false;
_running[anim]._runFrame();
@@ -428,7 +430,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Starts or resumes an animation.
* @method run
* @chainable
- */
+ */
run: function() {
if (this.get(PAUSED)) {
this._resume();
@@ -444,7 +446,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Calling run() will continue where it left off.
* @method pause
* @chainable
- */
+ */
pause: function() {
if (this.get(RUNNING)) {
this._pause();
@@ -457,7 +459,7 @@ YUI.add('anim-base', function (Y, NAME) {
* @method stop
* @param {Boolean} finish If true, the animation will move to the last frame
* @chainable
- */
+ */
stop: function(finish) {
if (this.get(RUNNING) || this.get(PAUSED)) {
this._end(finish);
@@ -526,10 +528,8 @@ YUI.add('anim-base', function (Y, NAME) {
var d = this._runtimeAttr.duration,
t = new Date() - this.get(START_TIME),
reverse = this.get(REVERSE),
- done = (t >= d),
- attribute,
- setter;
-
+ done = (t >= d);
+
this._runAttrs(t, d, reverse);
this._actualFrames += 1;
this._set(ELAPSED_TIME, t);
@@ -566,9 +566,9 @@ YUI.add('anim-base', function (Y, NAME) {
customAttr[i].set : Y.Anim.DEFAULT_SETTER;
if (!done) {
- setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
+ setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
} else {
- setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
+ setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
}
}
}
@@ -625,8 +625,8 @@ YUI.add('anim-base', function (Y, NAME) {
begin = begin.call(this, node);
}
- var mFrom = Y.Anim.RE_UNITS.exec(begin);
- var mTo = Y.Anim.RE_UNITS.exec(val);
+ var mFrom = Y.Anim.RE_UNITS.exec(begin),
+ mTo = Y.Anim.RE_UNITS.exec(val);
begin = mFrom ? mFrom[1] : begin;
end = mTo ? mTo[1] : val;
@@ -658,10 +658,11 @@ YUI.add('anim-base', function (Y, NAME) {
var node = this._node,
val = node.getComputedStyle(attr),
get = (attr === 'left') ? 'getX': 'getY',
- set = (attr === 'left') ? 'setX': 'setY';
+ set = (attr === 'left') ? 'setX': 'setY',
+ position;
if (val === 'auto') {
- var position = node.getStyle('position');
+ position = node.getStyle('position');
if (position === 'absolute' || position === 'fixed') {
val = node[get]();
node[set](val);
View
2 build/anim-base/anim-base-min.js
@@ -1 +1 @@
-YUI.add("anim-base",function(e,t){var n="running",r="startTime",i="elapsedTime",s="start",o="tween",u="end",a="node",f="paused",l="reverse",c="iterationCount",h=Number,p={},d;e.Anim=function(){e.Anim.superclass.constructor.apply(this,arguments),e.Anim._instances[e.stamp(this)]=this},e.Anim.NAME="anim",e.Anim._instances={},e.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,e.Anim.DEFAULT_UNIT="px",e.Anim.DEFAULT_EASING=function(e,t,n,r){return n*e/r+t},e.Anim._intervalTime=20,e.Anim.behaviors={left:{get:function(e,t){return e._getOffset(t)}}},e.Anim.behaviors.top=e.Anim.behaviors.left,e.Anim.DEFAULT_SETTER=function(t,n,r,i,s,o,u,a){var f=t._node,l=f._node,c=u(s,h(r),h(i)-h(r),o);l?"style"in l&&(n in l.style||n in e.DOM.CUSTOM_STYLES)?(a=a||"",f.setStyle(n,c+a)):"attributes"in l&&n in l.attributes?f.setAttribute(n,c):n in l&&(l[n]=c):f.set?f.set(n,c):n in f&&(f[n]=c)},e.Anim.DEFAULT_GETTER=function(t,n){var r=t._node,i=r._node,s="";return i?"style"in i&&(n in i.style||n in e.DOM.CUSTOM_STYLES)?s=r.getComputedStyle(n):"attributes"in i&&n in i.attributes?s=r.getAttribute(n):n in i&&(s=i[n]):r.get?s=r.get(n):n in r&&(s=r[n]),s},e.Anim.ATTRS={node:{setter:function(t){return t&&(typeof t=="string"||t.nodeType)&&(t=e.one(t)),this._node=t,!t,t}},duration:{value:1},easing:{value:e.Anim.DEFAULT_EASING,setter:function(t){if(typeof t=="string"&&e.Easing)return e.Easing[t]}},from:{},to:{},startTime:{value:0,readOnly:!0},elapsedTime:{value:0,readOnly:!0},running:{getter:function(){return!!p[e.stamp(this)]},value:!1,readOnly:!0},iterations:{value:1},iterationCount:{value:0,readOnly:!0},direction:{value:"normal"},paused:{readOnly:!0,value:!1},reverse:{value:!1}},e.Anim.run=function(){var t=e.Anim._instances;for(var n in t)t[n].run&&t[n].run()},e.Anim.pause=function(){for(var t in p)p[t].pause&&p[t].pause();e.Anim._stopTimer()},e.Anim.stop=function(){for(var t in p)p[t].stop&&p[t].stop();e.Anim._stopTimer()},e.Anim._startTimer=function(){d||(d=setInterval(e.Anim._runFrame,e.Anim._intervalTime))},e.Anim._stopTimer=function(){clearInterval(d),d=0},e.Anim._runFrame=function(){var t=!0;for(var n in p)p[n]._runFrame&&(t=!1,p[n]._runFrame());t&&e.Anim._stopTimer()},e.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var v={run:function(){return this.get(f)?this._resume():this.get(n)||this._start(),this},pause:function(){return this.get(n)&&this._pause(),this},stop:function(e){return(this.get(n)||this.get(f))&&this._end(e),this},_added:!1,_start:function(){this._set(r,new Date-this.get(i)),this._actualFrames=0,this.get(f)||this._initAnimAttr(),p[e.stamp(this)]=this,e.Anim._startTimer(),this.fire(s)},_pause:function(){this._set(r,null),this._set(f,!0),delete p[e.stamp(this)],this.fire("pause")},_resume:function(){this._set(f,!1),p[e.stamp(this)]=this,this._set(r,new Date-this.get(i)),e.Anim._startTimer(),this.fire("resume")},_end:function(t){var n=this.get("duration")*1e3;t&&this._runAttrs(n,n,this.get(l)),this._set(r,null),this._set(i,0),this._set(f,!1),delete p[e.stamp(this)],this.fire(u,{elapsed:this.get(i)})},_runFrame:function(){var e=this._runtimeAttr.duration,t=new Date-this.get(r),n=this.get(l),s=t>=e,u,a;this._runAttrs(t,e,n),this._actualFrames+=1,this._set(i,t),this.fire(o),s&&this._lastFrame()},_runAttrs:function(t,n,r){var i=this._runtimeAttr,s=e.Anim.behaviors,o=i.easing,u=n,a=!1,f,l,c;t>=n&&(a=!0),r&&(t=n-t,u=0);for(c in i)i[c].to&&(f=i[c],l=c in s&&"set"in s[c]?s[c].set:e.Anim.DEFAULT_SETTER,a?l(this,c,f.from,f.to,u,n,o,f.unit):l(this,c,f.from,f.to,t,n,o,f.unit))},_lastFrame:function(){var e=this.get("iterations"),t=this.get(c);t+=1,e==="infinite"||t<e?(this.get("direction")==="alternate"&&this.set(l,!this.get(l)),this.fire("iteration")):(t=0,this._end()),this._set(r,new Date),this._set(c,t)},_initAnimAttr:function(){var t=this.get("from")||{},n=this.get("to")||{},r={duration:this.get("duration")*1e3,easing:this.get("easing")},i=e.Anim.behaviors,s=this.get(a),o,u,f;e.each(n,function(n,a){typeof n=="function"&&(n=n.call(this,s)),u=t[a],u===undefined?u=a in i&&"get"in i[a]?i[a].get(this,a):e.Anim.DEFAULT_GETTER(this,a):typeof u=="function"&&(u=u.call(this,s));var l=e.Anim.RE_UNITS.exec(u),c=e.Anim.RE_UNITS.exec(n);u=l?l[1]:u,f=c?c[1]:n,o=c?c[2]:l?l[2]:"",!o&&e.Anim.RE_DEFAULT_UNIT.test(a)&&(o=e.Anim.DEFAULT_UNIT);if(!u||!f){e.error('invalid "from" or "to" for "'+a+'"',"Anim");return}r[a]={from:e.Lang.isObject(u)?e.clone(u):u,to:f,unit:o}},this),this._runtimeAttr=r},_getOffset:function(e){var t=this._node,n=t.getComputedStyle(e),r=e==="left"?"getX":"getY",i=e==="left"?"setX":"setY";if(n==="auto"){var s=t.getStyle("position");s==="absolute"||s==="fixed"?(n=t[r](),t[i](n)):n=0}return n},destructor:function(){delete e.Anim._instances[e.stamp(this)]}};e.extend(e.Anim,e.Base,v)},"@VERSION@",{requires:["base-base","node-style"]});
+YUI.add("anim-base",function(e,t){var n="running",r="startTime",i="elapsedTime",s="start",o="tween",u="end",a="node",f="paused",l="reverse",c="iterationCount",h=Number,p={},d;e.Anim=function(){e.Anim.superclass.constructor.apply(this,arguments),e.Anim._instances[e.stamp(this)]=this},e.Anim.NAME="anim",e.Anim._instances={},e.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,e.Anim.DEFAULT_UNIT="px",e.Anim.DEFAULT_EASING=function(e,t,n,r){return n*e/r+t},e.Anim._intervalTime=20,e.Anim.behaviors={left:{get:function(e,t){return e._getOffset(t)}}},e.Anim.behaviors.top=e.Anim.behaviors.left,e.Anim.DEFAULT_SETTER=function(t,n,r,i,s,o,u,a){var f=t._node,l=f._node,c=u(s,h(r),h(i)-h(r),o);l?"style"in l&&(n in l.style||n in e.DOM.CUSTOM_STYLES)?(a=a||"",f.setStyle(n,c+a)):"attributes"in l&&n in l.attributes?f.setAttribute(n,c):n in l&&(l[n]=c):f.set?f.set(n,c):n in f&&(f[n]=c)},e.Anim.DEFAULT_GETTER=function(t,n){var r=t._node,i=r._node,s="";return i?"style"in i&&(n in i.style||n in e.DOM.CUSTOM_STYLES)?s=r.getComputedStyle(n):"attributes"in i&&n in i.attributes?s=r.getAttribute(n):n in i&&(s=i[n]):r.get?s=r.get(n):n in r&&(s=r[n]),s},e.Anim.ATTRS={node:{setter:function(t){return t&&(typeof t=="string"||t.nodeType)&&(t=e.one(t)),this._node=t,!t,t}},duration:{value:1},easing:{value:e.Anim.DEFAULT_EASING,setter:function(t){if(typeof t=="string"&&e.Easing)return e.Easing[t]}},from:{},to:{},startTime:{value:0,readOnly:!0},elapsedTime:{value:0,readOnly:!0},running:{getter:function(){return!!p[e.stamp(this)]},value:!1,readOnly:!0},iterations:{value:1},iterationCount:{value:0,readOnly:!0},direction:{value:"normal"},paused:{readOnly:!0,value:!1},reverse:{value:!1}},e.Anim.run=function(){var t=e.Anim._instances,n;for(n in t)t[n].run&&t[n].run()},e.Anim.pause=function(){for(var t in p)p[t].pause&&p[t].pause();e.Anim._stopTimer()},e.Anim.stop=function(){for(var t in p)p[t].stop&&p[t].stop();e.Anim._stopTimer()},e.Anim._startTimer=function(){d||(d=setInterval(e.Anim._runFrame,e.Anim._intervalTime))},e.Anim._stopTimer=function(){clearInterval(d),d=0},e.Anim._runFrame=function(){var t=!0,n;for(n in p)p[n]._runFrame&&(t=!1,p[n]._runFrame());t&&e.Anim._stopTimer()},e.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var v={run:function(){return this.get(f)?this._resume():this.get(n)||this._start(),this},pause:function(){return this.get(n)&&this._pause(),this},stop:function(e){return(this.get(n)||this.get(f))&&this._end(e),this},_added:!1,_start:function(){this._set(r,new Date-this.get(i)),this._actualFrames=0,this.get(f)||this._initAnimAttr(),p[e.stamp(this)]=this,e.Anim._startTimer(),this.fire(s)},_pause:function(){this._set(r,null),this._set(f,!0),delete p[e.stamp(this)],this.fire("pause")},_resume:function(){this._set(f,!1),p[e.stamp(this)]=this,this._set(r,new Date-this.get(i)),e.Anim._startTimer(),this.fire("resume")},_end:function(t){var n=this.get("duration")*1e3;t&&this._runAttrs(n,n,this.get(l)),this._set(r,null),this._set(i,0),this._set(f,!1),delete p[e.stamp(this)],this.fire(u,{elapsed:this.get(i)})},_runFrame:function(){var e=this._runtimeAttr.duration,t=new Date-this.get(r),n=this.get(l),s=t>=e;this._runAttrs(t,e,n),this._actualFrames+=1,this._set(i,t),this.fire(o),s&&this._lastFrame()},_runAttrs:function(t,n,r){var i=this._runtimeAttr,s=e.Anim.behaviors,o=i.easing,u=n,a=!1,f,l,c;t>=n&&(a=!0),r&&(t=n-t,u=0);for(c in i)i[c].to&&(f=i[c],l=c in s&&"set"in s[c]?s[c].set:e.Anim.DEFAULT_SETTER,a?l(this,c,f.from,f.to,u,n,o,f.unit):l(this,c,f.from,f.to,t,n,o,f.unit))},_lastFrame:function(){var e=this.get("iterations"),t=this.get(c);t+=1,e==="infinite"||t<e?(this.get("direction")==="alternate"&&this.set(l,!this.get(l)),this.fire("iteration")):(t=0,this._end()),this._set(r,new Date),this._set(c,t)},_initAnimAttr:function(){var t=this.get("from")||{},n=this.get("to")||{},r={duration:this.get("duration")*1e3,easing:this.get("easing")},i=e.Anim.behaviors,s=this.get(a),o,u,f;e.each(n,function(n,a){typeof n=="function"&&(n=n.call(this,s)),u=t[a],u===undefined?u=a in i&&"get"in i[a]?i[a].get(this,a):e.Anim.DEFAULT_GETTER(this,a):typeof u=="function"&&(u=u.call(this,s));var l=e.Anim.RE_UNITS.exec(u),c=e.Anim.RE_UNITS.exec(n);u=l?l[1]:u,f=c?c[1]:n,o=c?c[2]:l?l[2]:"",!o&&e.Anim.RE_DEFAULT_UNIT.test(a)&&(o=e.Anim.DEFAULT_UNIT);if(!u||!f){e.error('invalid "from" or "to" for "'+a+'"',"Anim");return}r[a]={from:e.Lang.isObject(u)?e.clone(u):u,to:f,unit:o}},this),this._runtimeAttr=r},_getOffset:function(e){var t=this._node,n=t.getComputedStyle(e),r=e==="left"?"getX":"getY",i=e==="left"?"setX":"setY",s;return n==="auto"&&(s=t.getStyle("position"),s==="absolute"||s==="fixed"?(n=t[r](),t[i](n)):n=0),n},destructor:function(){delete e.Anim._instances[e.stamp(this)]}};e.extend(e.Anim,e.Base,v)},"@VERSION@",{requires:["base-base","node-style"]});
View
73 build/anim-base/anim-base.js
@@ -87,7 +87,7 @@ YUI.add('anim-base', function (Y, NAME) {
};
/**
- * Time in milliseconds passed to setInterval for frame processing
+ * Time in milliseconds passed to setInterval for frame processing
*
* @property intervalTime
* @default 20
@@ -175,7 +175,7 @@ YUI.add('anim-base', function (Y, NAME) {
node: {
setter: function(node) {
if (node) {
- if (typeof node == 'string' || node.nodeType) {
+ if (typeof node === 'string' || node.nodeType) {
node = Y.one(node);
}
}
@@ -197,7 +197,7 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * The method that will provide values to the attribute(s) during the animation.
+ * The method that will provide values to the attribute(s) during the animation.
* Defaults to "Easing.easeNone".
* @attribute easing
* @type Function
@@ -250,7 +250,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Date stamp for the first frame of the animation.
* @attribute startTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
startTime: {
@@ -262,7 +262,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Current time the animation has been running.
* @attribute elapsedTime
* @type Int
- * @default 0
+ * @default 0
* @readOnly
*/
elapsedTime: {
@@ -272,9 +272,9 @@ YUI.add('anim-base', function (Y, NAME) {
/**
* Whether or not the animation is currently running.
- * @attribute running
+ * @attribute running
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
running: {
@@ -286,18 +286,18 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * The number of times the animation should run
+ * The number of times the animation should run
* @attribute iterations
* @type Int
- * @default 1
+ * @default 1
*/
iterations: {
value: 1
},
/**
* The number of iterations that have occurred.
- * Resets when an animation ends (reaches iteration count or stop() called).
+ * Resets when an animation ends (reaches iteration count or stop() called).
* @attribute iterationCount
* @type Int
* @default 0
@@ -309,7 +309,7 @@ YUI.add('anim-base', function (Y, NAME) {
},
/**
- * How iterations of the animation should behave.
+ * How iterations of the animation should behave.
* Possible values are "normal" and "alternate".
* Normal will repeat the animation, alternate will reverse on every other pass.
*
@@ -323,9 +323,9 @@ YUI.add('anim-base', function (Y, NAME) {
/**
* Whether or not the animation is currently paused.
- * @attribute paused
+ * @attribute paused
* @type Boolean
- * @default false
+ * @default false
* @readOnly
*/
paused: {
@@ -337,7 +337,7 @@ YUI.add('anim-base', function (Y, NAME) {
* If true, animation begins from last frame
* @attribute reverse
* @type Boolean
- * @default false
+ * @default false
*/
reverse: {
value: false
@@ -350,10 +350,11 @@ YUI.add('anim-base', function (Y, NAME) {
* Runs all animation instances.
* @method run
* @static
- */
+ */
Y.Anim.run = function() {
- var instances = Y.Anim._instances;
- for (var i in instances) {
+ var instances = Y.Anim._instances,
+ i;
+ for (i in instances) {
if (instances[i].run) {
instances[i].run();
}
@@ -364,7 +365,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Pauses all animation instances.
* @method pause
* @static
- */
+ */
Y.Anim.pause = function() {
for (var i in _running) { // stop timer if nothing running
if (_running[i].pause) {
@@ -379,7 +380,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Stops all animation instances.
* @method stop
* @static
- */
+ */
Y.Anim.stop = function() {
for (var i in _running) { // stop timer if nothing running
if (_running[i].stop) {
@@ -388,7 +389,7 @@ YUI.add('anim-base', function (Y, NAME) {
}
Y.Anim._stopTimer();
};
-
+
Y.Anim._startTimer = function() {
if (!_timer) {
_timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);
@@ -405,10 +406,11 @@ YUI.add('anim-base', function (Y, NAME) {
* @method _runFrame
* @private
* @static
- */
+ */
Y.Anim._runFrame = function() {
- var done = true;
- for (var anim in _running) {
+ var done = true,
+ anim;
+ for (anim in _running) {
if (_running[anim]._runFrame) {
done = false;
_running[anim]._runFrame();
@@ -427,7 +429,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Starts or resumes an animation.
* @method run
* @chainable
- */
+ */
run: function() {
if (this.get(PAUSED)) {
this._resume();
@@ -443,7 +445,7 @@ YUI.add('anim-base', function (Y, NAME) {
* Calling run() will continue where it left off.
* @method pause
* @chainable
- */
+ */
pause: function() {
if (this.get(RUNNING)) {
this._pause();
@@ -456,7 +458,7 @@ YUI.add('anim-base', function (Y, NAME) {
* @method stop
* @param {Boolean} finish If true, the animation will move to the last frame
* @chainable
- */
+ */
stop: function(finish) {
if (this.get(RUNNING) || this.get(PAUSED)) {
this._end(finish);
@@ -525,10 +527,8 @@ YUI.add('anim-base', function (Y, NAME) {
var d = this._runtimeAttr.duration,
t = new Date() - this.get(START_TIME),
reverse = this.get(REVERSE),
- done = (t >= d),
- attribute,
- setter;
-
+ done = (t >= d);
+
this._runAttrs(t, d, reverse);
this._actualFrames += 1;
this._set(ELAPSED_TIME, t);
@@ -565,9 +565,9 @@ YUI.add('anim-base', function (Y, NAME) {
customAttr[i].set : Y.Anim.DEFAULT_SETTER;
if (!done) {
- setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
+ setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
} else {
- setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
+ setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
}
}
}
@@ -624,8 +624,8 @@ YUI.add('anim-base', function (Y, NAME) {
begin = begin.call(this, node);
}
- var mFrom = Y.Anim.RE_UNITS.exec(begin);
- var mTo = Y.Anim.RE_UNITS.exec(val);
+ var mFrom = Y.Anim.RE_UNITS.exec(begin),
+ mTo = Y.Anim.RE_UNITS.exec(val);
begin = mFrom ? mFrom[1] : begin;
end = mTo ? mTo[1] : val;
@@ -657,10 +657,11 @@ YUI.add('anim-base', function (Y, NAME) {
var node = this._node,
val = node.getComputedStyle(attr),
get = (attr === 'left') ? 'getX': 'getY',
- set = (attr === 'left') ? 'setX': 'setY';
+ set = (attr === 'left') ? 'setX': 'setY',
+ position;
if (val === 'auto') {
- var position = node.getStyle('position');
+ position = node.getStyle('position');
if (position === 'absolute' || position === 'fixed') {
val = node[get]();
node[set](val);
View
12 build/anim-color/anim-color-coverage.js
@@ -26,7 +26,7 @@ _yuitest_coverage["build/anim-color/anim-color.js"] = {
path: "build/anim-color/anim-color.js",
code: []
};
-_yuitest_coverage["build/anim-color/anim-color.js"].code=["YUI.add('anim-color', function (Y, NAME) {","","/**"," * Adds support for color properties in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-color"," */","","var NUM = Number;","","Y.Anim.getUpdatedColorValue = function(fromColor, toColor, elapsed, duration, fn)","{"," fromColor = Y.Color.re_RGB.exec(Y.Color.toRGB(fromColor));"," toColor = Y.Color.re_RGB.exec(Y.Color.toRGB(toColor));",""," if (!fromColor || fromColor.length < 3 || !toColor || toColor.length < 3) {"," Y.error('invalid from or to passed to color behavior');"," }",""," return 'rgb(' + ["," Math.floor(fn(elapsed, NUM(fromColor[1]), NUM(toColor[1]) - NUM(fromColor[1]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[2]), NUM(toColor[2]) - NUM(fromColor[2]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[3]), NUM(toColor[3]) - NUM(fromColor[3]), duration))"," ].join(', ') + ')';","};","","Y.Anim.behaviors.color = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn)); "," },"," "," // TODO: default bgcolor const"," get: function(anim, att) {"," var val = anim._node.getComputedStyle(att);"," val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;"," return val;"," }","};","","Y.each(['backgroundColor',"," 'borderColor',"," 'borderTopColor',"," 'borderRightColor', "," 'borderBottomColor', "," 'borderLeftColor'],"," function(v, i) {"," Y.Anim.behaviors[v] = Y.Anim.behaviors.color;"," }",");","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
+_yuitest_coverage["build/anim-color/anim-color.js"].code=["YUI.add('anim-color', function (Y, NAME) {","","/**"," * Adds support for color properties in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-color"," */","","var NUM = Number;","","Y.Anim.getUpdatedColorValue = function(fromColor, toColor, elapsed, duration, fn)","{"," fromColor = Y.Color.re_RGB.exec(Y.Color.toRGB(fromColor));"," toColor = Y.Color.re_RGB.exec(Y.Color.toRGB(toColor));",""," if (!fromColor || fromColor.length < 3 || !toColor || toColor.length < 3) {"," Y.error('invalid from or to passed to color behavior');"," }",""," return 'rgb(' + ["," Math.floor(fn(elapsed, NUM(fromColor[1]), NUM(toColor[1]) - NUM(fromColor[1]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[2]), NUM(toColor[2]) - NUM(fromColor[2]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[3]), NUM(toColor[3]) - NUM(fromColor[3]), duration))"," ].join(', ') + ')';","};","","Y.Anim.behaviors.color = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn));"," },",""," // TODO: default bgcolor const"," get: function(anim, att) {"," var val = anim._node.getComputedStyle(att);"," val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;"," return val;"," }","};","","Y.each(['backgroundColor',"," 'borderColor',"," 'borderTopColor',"," 'borderRightColor',"," 'borderBottomColor',"," 'borderLeftColor'],"," function(v) {"," Y.Anim.behaviors[v] = Y.Anim.behaviors.color;"," }",");","","","}, '@VERSION@', {\"requires\": [\"anim-base\"]});"];
_yuitest_coverage["build/anim-color/anim-color.js"].lines = {"1":0,"10":0,"12":0,"14":0,"15":0,"17":0,"18":0,"21":0,"28":0,"30":0,"35":0,"36":0,"37":0,"41":0,"48":0};
_yuitest_coverage["build/anim-color/anim-color.js"].functions = {"getUpdatedColorValue:12":0,"set:29":0,"get:34":0,"(anonymous 2):47":0,"(anonymous 1):1":0};
_yuitest_coverage["build/anim-color/anim-color.js"].coveredLines = 15;
@@ -73,9 +73,9 @@ Y.Anim.behaviors.color = {
set: function(anim, att, from, to, elapsed, duration, fn) {
_yuitest_coverfunc("build/anim-color/anim-color.js", "set", 29);
_yuitest_coverline("build/anim-color/anim-color.js", 30);
-anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn));
+anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn));
},
-
+
// TODO: default bgcolor const
get: function(anim, att) {
_yuitest_coverfunc("build/anim-color/anim-color.js", "get", 34);
@@ -92,10 +92,10 @@ _yuitest_coverline("build/anim-color/anim-color.js", 41);
Y.each(['backgroundColor',
'borderColor',
'borderTopColor',
- 'borderRightColor',
- 'borderBottomColor',
+ 'borderRightColor',
+ 'borderBottomColor',
'borderLeftColor'],
- function(v, i) {
+ function(v) {
_yuitest_coverfunc("build/anim-color/anim-color.js", "(anonymous 2)", 47);
_yuitest_coverline("build/anim-color/anim-color.js", 48);
Y.Anim.behaviors[v] = Y.Anim.behaviors.color;
View
10 build/anim-color/anim-color-debug.js
@@ -27,9 +27,9 @@ Y.Anim.getUpdatedColorValue = function(fromColor, toColor, elapsed, duration, f
Y.Anim.behaviors.color = {
set: function(anim, att, from, to, elapsed, duration, fn) {
- anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn));
+ anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn));
},
-
+
// TODO: default bgcolor const
get: function(anim, att) {
var val = anim._node.getComputedStyle(att);
@@ -41,10 +41,10 @@ Y.Anim.behaviors.color = {
Y.each(['backgroundColor',
'borderColor',
'borderTopColor',
- 'borderRightColor',
- 'borderBottomColor',
+ 'borderRightColor',
+ 'borderBottomColor',