kopia lustrzana https://github.com/backface/turtlestitch
reason for scroll issue: only non-cached palettes needed to be scrolled
rodzic
5db42a9889
commit
ed5eccccae
9
gui.js
9
gui.js
|
@ -889,8 +889,6 @@ IDE_Morph.prototype.createPalette = function (forSearching) {
|
||||||
|
|
||||||
this.palette.setWidth(this.logo.width());
|
this.palette.setWidth(this.logo.width());
|
||||||
this.add(this.palette);
|
this.add(this.palette);
|
||||||
this.palette.scrollX(this.palette.padding);
|
|
||||||
this.palette.scrollY(this.palette.padding);
|
|
||||||
return this.palette;
|
return this.palette;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1390,9 +1388,6 @@ IDE_Morph.prototype.fixLayout = function (situation) {
|
||||||
// categories
|
// categories
|
||||||
this.categories.setLeft(this.logo.left());
|
this.categories.setLeft(this.logo.left());
|
||||||
this.categories.setTop(this.logo.bottom());
|
this.categories.setTop(this.logo.bottom());
|
||||||
} else {
|
|
||||||
this.palette.scrollX(-1);
|
|
||||||
this.palette.scrollY(-5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// palette
|
// palette
|
||||||
|
@ -1401,6 +1396,10 @@ IDE_Morph.prototype.fixLayout = function (situation) {
|
||||||
this.palette.setHeight(this.bottom() - this.palette.top());
|
this.palette.setHeight(this.bottom() - this.palette.top());
|
||||||
|
|
||||||
if (situation !== 'refreshPalette') {
|
if (situation !== 'refreshPalette') {
|
||||||
|
// palette
|
||||||
|
this.palette.scrollX(padding);
|
||||||
|
this.palette.scrollY(padding);
|
||||||
|
|
||||||
// stage
|
// stage
|
||||||
if (this.isAppMode) {
|
if (this.isAppMode) {
|
||||||
this.stage.setScale(Math.floor(Math.min(
|
this.stage.setScale(Math.floor(Math.min(
|
||||||
|
|
|
@ -2270,6 +2270,11 @@ SpriteMorph.prototype.freshPalette = function (category) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//layout
|
||||||
|
|
||||||
|
palette.scrollX(palette.padding);
|
||||||
|
palette.scrollY(palette.padding);
|
||||||
|
|
||||||
Morph.prototype.trackChanges = oldFlag;
|
Morph.prototype.trackChanges = oldFlag;
|
||||||
return palette;
|
return palette;
|
||||||
};
|
};
|
||||||
|
|
Ładowanie…
Reference in New Issue