NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / anim-xy / anim-xy.js
blob4b0d39e41728d732f04940be44940861fe34ad36
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 YUI.add('anim-xy', function (Y, NAME) {
10 /**
11  * Adds support for the <code>xy</code> property in <code>from</code> and
12  * <code>to</code> attributes.
13  * @module anim
14  * @submodule anim-xy
15  */
17 var NUM = Number;
19 Y.Anim.behaviors.xy = {
20     set: function(anim, att, from, to, elapsed, duration, fn) {
21         anim._node.setXY([
22             fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
23             fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
24         ]);
25     },
26     get: function(anim) {
27         return anim._node.getXY();
28     }
33 }, '3.13.0', {"requires": ["anim-base", "node-screen"]});