git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git]
/
src
/
core
/
Element.scroll-more.js
diff --git
a/src/core/Element.scroll-more.js
b/src/core/Element.scroll-more.js
index
e02c3c0
..
ef5fd72
100644
(file)
--- a/
src/core/Element.scroll-more.js
+++ b/
src/core/Element.scroll-more.js
@@
-1,5
+1,5
@@
/*!
/*!
- * Ext JS Library 3.0.
0
+ * Ext JS Library 3.0.
3
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
@@
-16,15
+16,15
@@
Ext.Element.addMethods({
* @return {Element} this
\r
*/
\r
scrollTo : function(side, value, animate){
\r
* @return {Element} this
\r
*/
\r
scrollTo : function(side, value, animate){
\r
- var t
ester = /top/i,
\r
- prop = "scroll" + (tester.test(side) ? "Top" : "Left"),
\r
-
me = this,
\r
-
dom = me.dom;
\r
+ var t
op = /top/i.test(side), //check if we're scrolling top or left
\r
+ prop = 'scroll' + (top ? 'Left' : 'Top'), // if scrolling top, we need to grab scrollLeft, if left, scrollTop
\r
+ me = this,
\r
+ dom = me.dom;
\r
if (!animate || !me.anim) {
\r
dom[prop] = value;
\r
} else {
\r
if (!animate || !me.anim) {
\r
dom[prop] = value;
\r
} else {
\r
- me.anim({scroll: {to: t
ester.test(prop)
? [dom[prop], value] : [value, dom[prop]]}},
\r
-
me.preanim(arguments, 2), 'scroll');
\r
+ me.anim({scroll: {to: t
op
? [dom[prop], value] : [value, dom[prop]]}},
\r
+ me.preanim(arguments, 2), 'scroll');
\r
}
\r
return me;
\r
},
\r
}
\r
return me;
\r
},
\r