Show:
  1. /**
  2. * Adds support for the <code>xy</code> property in <code>from</code> and
  3. * <code>to</code> attributes.
  4. * @module anim
  5. * @submodule anim-xy
  6. */
  7. var NUM = Number;
  8. Y.Anim.behaviors.xy = {
  9. set: function(anim, att, from, to, elapsed, duration, fn) {
  10. anim._node.setXY([
  11. fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
  12. fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
  13. ]);
  14. },
  15. get: function(anim) {
  16. return anim._node.getXY();
  17. }
  18. };