Merge pull request #84 from queryselector/issue-24

Fixed #24 for horizontal scrolling
pull/3/merge
Jens Mönig 2013-05-06 01:51:50 -07:00
commit f22338b3a9
1 zmienionych plików z 6 dodań i 9 usunięć

Wyświetl plik

@ -8681,12 +8681,12 @@ ScrollFrameMorph.prototype.scrollX = function (steps) {
newX;
newX = cl + steps;
if (newX > l) {
newX = l;
}
if (newX + cw < r) {
newX = r - cw;
}
if (newX > l) {
newX = l;
}
if (newX !== cl) {
this.contents.setLeft(newX);
}
@ -8700,14 +8700,11 @@ ScrollFrameMorph.prototype.scrollY = function (steps) {
newY;
newY = ct + steps;
if (newY > t) {
newY = t;
}
if (newY + ch < b) {
newY = b - ch;
if (newY > t) {
newY = t;
}
}
if (newY > t) {
newY = t;
}
if (newY !== ct) {
this.contents.setTop(newY);