2
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
Code licensed under the BSD License:
4
http://developer.yahoo.net/yui/license.txt
7
YUI.add('anim-scroll', function(Y) {
10
* Adds support for the <code>scroll</code> property in <code>to</code>
11
* and <code>from</code> attributes.
13
* @submodule anim-scroll
19
Y.Anim.behaviors.scroll = {
20
set: function(anim, att, from, to, elapsed, duration, fn) {
24
fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
25
fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
29
node.set('scrollLeft', val[0]);
33
node.set('scrollTop', val[1]);
37
var node = anim._node;
38
return [node.get('scrollLeft'), node.get('scrollTop')];
44
}, '3.0.0pr2' ,{requires:['anim-base', 'node-base']});