sort order of blocks in custom categories alphabetically in the unified palette

snap7
jmoenig 2021-10-11 22:27:24 +02:00
rodzic 4f3cd192cc
commit f802bf1e99
3 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -39,6 +39,9 @@
* German
* Chinese, thanks, Simon!
### 2021-10-11
* objects: sort order of blocks in custom categories alphabetically in the unified palette
### 2021-10-08
* objects: tweaked variable block visibility
* objects: filter hidden blocks out from search / keyboard input results

Wyświetl plik

@ -18,7 +18,7 @@
<script src="src/widgets.js?version=2021-07-21"></script>
<script src="src/blocks.js?version=2021-10-07"></script>
<script src="src/threads.js?version=2021-10-06"></script>
<script src="src/objects.js?version=2021-10-08"></script>
<script src="src/objects.js?version=2021-10-11"></script>
<script src="src/scenes.js?version=2021-07-21"></script>
<script src="src/gui.js?version=2021-09-30"></script>
<script src="src/paint.js?version=2021-07-05"></script>

Wyświetl plik

@ -87,7 +87,7 @@ BlockVisibilityDialogMorph*/
/*jshint esversion: 6*/
modules.objects = '2021-October-08';
modules.objects = '2021-October-11';
var SpriteMorph;
var StageMorph;
@ -166,7 +166,9 @@ SpriteMorph.prototype.blockColor = {
SpriteMorph.prototype.customCategories = new Map(); // key: name, value: color
SpriteMorph.prototype.allCategories = function () {
return this.categories.concat(Array.from(this.customCategories.keys()));
return this.categories.concat(
Array.from(this.customCategories.keys()).sort()
);
};
SpriteMorph.prototype.blockColorFor = function (category) {