revert previous scrolling optimization

nvmd, I'm so stupid ;-)
snap7
jmoenig 2021-07-08 13:12:34 +02:00
rodzic 04bf915d12
commit 441e3e4d4d
2 zmienionych plików z 6 dodań i 9 usunięć

Wyświetl plik

@ -25,7 +25,6 @@
* gui: accelerated unified palette scrolling animation
* adjust scroll bars when refreshing the palette
* store: commented out saving the unified palette setting in the project xml during development
* morphic: optimized Morph >> scrollIntoView()
### 2021-07-07
* morphic, gui: tweaked perish() animation

Wyświetl plik

@ -1291,7 +1291,7 @@
/*jshint esversion: 6*/
var morphicVersion = '2021-July-08';
var morphicVersion = '2021-July-07';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = true;
@ -3422,26 +3422,24 @@ Morph.prototype.keepWithin = function (aMorph) {
Morph.prototype.scrollIntoView = function () {
var leftOff, rightOff, topOff, bottomOff,
sf = this.parentThatIsA(ScrollFrameMorph),
fb;
sf = this.parentThatIsA(ScrollFrameMorph);
if (!sf) {return; }
fb = this.fullBounds();
rightOff = Math.min(
fb.right() - sf.right(),
this.fullBounds().right() - sf.right(),
sf.contents.right() - sf.right()
);
if (rightOff > 0) {
sf.contents.moveBy(new Point(-rightOff, 0));
}
leftOff = fb.left() - sf.left();
leftOff = this.fullBounds().left() - sf.left();
if (leftOff < 0) {
sf.contents.moveBy(new Point(-leftOff, 0));
}
topOff = fb.top() - sf.top();
topOff = this.fullBounds().top() - sf.top();
if (topOff < 0) {
sf.contents.moveBy(new Point(0, -topOff));
}
bottomOff = fb.bottom() - sf.bottom();
bottomOff = this.fullBounds().bottom() - sf.bottom();
if (bottomOff > 0) {
sf.contents.moveBy(new Point(0, -bottomOff));
}