API Docs for: 3.17.2
Show:

File: anim/js/anim-xy.js

  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.  
  8. var NUM = Number;
  9.  
  10. Y.Anim.behaviors.xy = {
  11. set: function(anim, att, from, to, elapsed, duration, fn) {
  12. anim._node.setXY([
  13. fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
  14. fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
  15. ]);
  16. },
  17. get: function(anim) {
  18. return anim._node.getXY();
  19. }
  20. };
  21.  
  22.