kopia lustrzana https://github.com/backface/turtlestitch
commit
f22338b3a9
15
morphic.js
15
morphic.js
|
@ -8681,12 +8681,12 @@ ScrollFrameMorph.prototype.scrollX = function (steps) {
|
||||||
newX;
|
newX;
|
||||||
|
|
||||||
newX = cl + steps;
|
newX = cl + steps;
|
||||||
if (newX > l) {
|
|
||||||
newX = l;
|
|
||||||
}
|
|
||||||
if (newX + cw < r) {
|
if (newX + cw < r) {
|
||||||
newX = r - cw;
|
newX = r - cw;
|
||||||
}
|
}
|
||||||
|
if (newX > l) {
|
||||||
|
newX = l;
|
||||||
|
}
|
||||||
if (newX !== cl) {
|
if (newX !== cl) {
|
||||||
this.contents.setLeft(newX);
|
this.contents.setLeft(newX);
|
||||||
}
|
}
|
||||||
|
@ -8700,14 +8700,11 @@ ScrollFrameMorph.prototype.scrollY = function (steps) {
|
||||||
newY;
|
newY;
|
||||||
|
|
||||||
newY = ct + steps;
|
newY = ct + steps;
|
||||||
if (newY > t) {
|
|
||||||
newY = t;
|
|
||||||
}
|
|
||||||
if (newY + ch < b) {
|
if (newY + ch < b) {
|
||||||
newY = b - ch;
|
newY = b - ch;
|
||||||
if (newY > t) {
|
}
|
||||||
newY = t;
|
if (newY > t) {
|
||||||
}
|
newY = t;
|
||||||
}
|
}
|
||||||
if (newY !== ct) {
|
if (newY !== ct) {
|
||||||
this.contents.setTop(newY);
|
this.contents.setTop(newY);
|
||||||
|
|
Ładowanie…
Reference in New Issue