kopia lustrzana https://github.com/backface/turtlestitch
scroll selected custom category button into view
rodzic
99e4412f4b
commit
1d981576ac
|
@ -42,6 +42,7 @@
|
|||
|
||||
### 2021-10-14
|
||||
* gui, byob, objects: scroll custom category buttons if there are more than 6
|
||||
* gui, byob: scroll selected custom category button into view
|
||||
|
||||
### 2021-10-12
|
||||
* scenes, store: store single palette setting per project (for making extensions)
|
||||
|
|
|
@ -1756,7 +1756,12 @@ BlockDialogMorph.prototype.init = function (target, action, environment) {
|
|||
this.categories.buttons = [];
|
||||
|
||||
this.categories.refresh = function () {
|
||||
this.buttons.forEach(cat => cat.refresh());
|
||||
this.buttons.forEach(cat => {
|
||||
cat.refresh();
|
||||
if (cat.state) {
|
||||
cat.scrollIntoView();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.createCategoryButtons();
|
||||
|
|
|
@ -1267,7 +1267,12 @@ IDE_Morph.prototype.createCategories = function () {
|
|||
this.categories.buttons = [];
|
||||
|
||||
this.categories.refresh = function () {
|
||||
this.buttons.forEach(cat => cat.refresh());
|
||||
this.buttons.forEach(cat => {
|
||||
cat.refresh();
|
||||
if (cat.state) {
|
||||
cat.scrollIntoView();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function changePalette(category) {
|
||||
|
|
Ładowanie…
Reference in New Issue