summaryrefslogtreecommitdiff
path: root/morphic.js
diff options
context:
space:
mode:
authorNathan Dinsmore <queryselector@gmail.com>2013-04-30 15:25:22 -0400
committerNathan Dinsmore <queryselector@gmail.com>2013-04-30 15:25:22 -0400
commit1fc39e61f7fa67e137e6b2a128d143b8edf4756a (patch)
treea319ca3580b289790169be749393a5cb7ca525ff /morphic.js
parente51a0ed7188b8361234a99781cb1d3c8ef7de62c (diff)
downloadsnap-1fc39e61f7fa67e137e6b2a128d143b8edf4756a.tar.gz
snap-1fc39e61f7fa67e137e6b2a128d143b8edf4756a.zip
Fixed #24 for horizontal scrolling
Diffstat (limited to 'morphic.js')
-rw-r--r--morphic.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/morphic.js b/morphic.js
index 436edea..6088c8c 100644
--- a/morphic.js
+++ b/morphic.js
@@ -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);