PDA

View Full Version : [FIXED][3.0rc1] Element.scroll only scrolls to the left



jacombs
21 Apr 2009, 8:50 AM
It appears that the rewrite for the Element.scroll method was not finished in 3.0rc1. As you can see below, it only includes code for scrolling to the left:


scroll : function(direction, distance, animate){
if(this.isScrollable()){
var el = this.dom,
l = el.scrollLeft, t = el.scrollTop,
w = el.scrollWidth, h = el.scrollHeight,
cw = el.clientWidth, ch = el.clientHeight,
scrolled = false,
l = Math.min(l + distance, w-cw),
r = Math.max(l - distance, 0),
t = Math.max(t - distance, 0),
b = Math.min(t + distance, h-ch),
hash = {
l : l,
left : l,
r : r,
right : r,
t : t,
top : t,
up : t,
b : b,
bottom : b,
down : b
};

direction = direction.toLowerCase();

if (v = hash[direction]) {
this.scrollTo("left", v, this.preanim(arguments, 2));
scrolled = true;
}
return scrolled;
}

jacombs
4 May 2009, 4:03 AM
Element.scroll is still broken. I reported this almost two weeks ago, but it doesn't appear that any effort has been made to address it.

http://www.extjs.com/forum/showthread.php?t=66303

The method appears to be incomplete, as if the programmer was interrupted before finishing it, or got hungry and went off to go get a sandwich and forgot about it. Or maybe a meteor struck him in the middle of it.

evant
4 May 2009, 4:17 AM
Just bump the initial thread, no need for another. Thanks.

evant
4 May 2009, 8:02 AM
Fixed in SVN, thanks.

Animal
5 May 2009, 12:38 AM
Element.scroll is still broken. I reported this almost two weeks ago, but it doesn't appear that any effort has been made to address it.

http://www.extjs.com/forum/showthread.php?t=66303

The method appears to be incomplete, as if the programmer was interrupted before finishing it, or got hungry and went off to go get a sandwich and forgot about it. Or maybe a meteor struck him in the middle of it.

:))

I predict you manage developers!