kopia lustrzana https://github.com/backface/turtlestitch
rodzic
04bf915d12
commit
441e3e4d4d
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue