X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_lib_Scroll.js.html;fp=docs%2Fsrc%2FRoo_lib_Scroll.js.html;h=5b5b3089954f380f5b9492da68bf189427884ac3;hb=9ff8ded6bbbd258ecd646184ba26020874e2c085;hp=0000000000000000000000000000000000000000;hpb=2542b67d1a0768025056f2f330bfe50b64d1ad38;p=roojs1 diff --git a/docs/src/Roo_lib_Scroll.js.html b/docs/src/Roo_lib_Scroll.js.html new file mode 100644 index 0000000000..5b5b308995 --- /dev/null +++ b/docs/src/Roo_lib_Scroll.js.html @@ -0,0 +1,68 @@ +/home/alan/gitlive/roojs1/Roo/lib/Scroll.js/* + * Portions of this file are based on pieces of Yahoo User Interface Library + * Copyright (c) 2007, Yahoo! Inc. All rights reserved. + * YUI licensed under the BSD License: + * http://developer.yahoo.net/yui/license.txt + * <script type="text/javascript"> + * + */ + (function() { + Roo.lib.Scroll = function(el, attributes, duration, method) { + if (el) { + Roo.lib.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Roo.extend(Roo.lib.Scroll, Roo.lib.ColorAnim); + + + var Y = Roo.lib; + var superclass = Y.Scroll.superclass; + var proto = Y.Scroll.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Scroll " + id); + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if (attr == 'scroll') { + val = [ + this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames), + this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames) + ]; + + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.getAttribute = function(attr) { + var val = null; + var el = this.getEl(); + + if (attr == 'scroll') { + val = [ el.scrollLeft, el.scrollTop ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.setAttribute = function(attr, val, unit) { + var el = this.getEl(); + + if (attr == 'scroll') { + el.scrollLeft = val[0]; + el.scrollTop = val[1]; + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + })(); + \ No newline at end of file