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/
8 YUI.add('anim-scroll', function (Y, NAME) {
11 * Adds support for the <code>scroll</code> property in <code>to</code>
12 * and <code>from</code> attributes.
14 * @submodule anim-scroll
19 //TODO: deprecate for scrollTop/Left properties?
20 Y.Anim.behaviors.scroll = {
21 set: function(anim, att, from, to, elapsed, duration, fn) {
25 fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
26 fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
30 node.set('scrollLeft', val[0]);
34 node.set('scrollTop', val[1]);
38 var node = anim._node;
39 return [node.get('scrollLeft'), node.get('scrollTop')];
45 }, '3.13.0', {"requires": ["anim-base"]});