reason for scroll issue: only non-cached palettes needed to be scrolled

pull/3/merge
Kunal Marwaha 2014-06-25 04:15:58 -07:00
rodzic 5db42a9889
commit ed5eccccae
2 zmienionych plików z 9 dodań i 5 usunięć

9
gui.js
Wyświetl plik

@ -889,8 +889,6 @@ IDE_Morph.prototype.createPalette = function (forSearching) {
this.palette.setWidth(this.logo.width());
this.add(this.palette);
this.palette.scrollX(this.palette.padding);
this.palette.scrollY(this.palette.padding);
return this.palette;
};
@ -1390,9 +1388,6 @@ IDE_Morph.prototype.fixLayout = function (situation) {
// categories
this.categories.setLeft(this.logo.left());
this.categories.setTop(this.logo.bottom());
} else {
this.palette.scrollX(-1);
this.palette.scrollY(-5);
}
// palette
@ -1401,6 +1396,10 @@ IDE_Morph.prototype.fixLayout = function (situation) {
this.palette.setHeight(this.bottom() - this.palette.top());
if (situation !== 'refreshPalette') {
// palette
this.palette.scrollX(padding);
this.palette.scrollY(padding);
// stage
if (this.isAppMode) {
this.stage.setScale(Math.floor(Math.min(

Wyświetl plik

@ -2270,6 +2270,11 @@ SpriteMorph.prototype.freshPalette = function (category) {
}
});
//layout
palette.scrollX(palette.padding);
palette.scrollY(palette.padding);
Morph.prototype.trackChanges = oldFlag;
return palette;
};