|
0
|
1 |
/* |
|
|
2 |
Copyright (c) 2009, Yahoo! Inc. All rights reserved. |
|
|
3 |
Code licensed under the BSD License: |
|
|
4 |
http://developer.yahoo.net/yui/license.txt |
|
|
5 |
version: 3.0.0b1 |
|
|
6 |
build: 1163 |
|
|
7 |
*/ |
|
|
8 |
YUI.add('anim-xy', function(Y) { |
|
|
9 |
|
|
|
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 |
*/ |
|
|
16 |
|
|
|
17 |
var NUM = Number; |
|
|
18 |
|
|
|
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 |
} |
|
|
29 |
}; |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
}, '3.0.0b1' ,{requires:['anim-base', 'node-screen']}); |